feat(web): refine AI sessions and task filtering

This commit is contained in:
2026-07-22 16:26:05 +08:00
parent 5d2f45ad83
commit b28a5d635c
9 changed files with 484 additions and 122 deletions

View File

@@ -119,14 +119,22 @@ if (!aiApiSource.includes('signal,')) failures.push('AI API requests must pass t
if (/\b(?:task|note|source)Id\b/.test(aiApiSource)) failures.push('AI session responses must not expose automatic formal object IDs')
const aiPageSource = readFileSync('src/pages/projects/project-ai.tsx', 'utf8')
for (const required of ['AI 对话', '创建会话', 'loading', 'error']) {
for (const required of ['新建会话', 'agent-chat-shell', 'agent-composer', 'IconAttachment', 'agent-send-button', 'onPressEnter', 'loading', 'error']) {
if (!aiPageSource.includes(required)) failures.push(`project AI page must include ${required}`)
}
for (const required of ['AbortController', 'generationRef', 'projectRef', 'setSessions([])']) {
if (!aiPageSource.includes(required)) failures.push(`project AI page must gate stale requests with ${required}`)
}
for (const forbidden of ['DeepSeek V4.0 Flash', '给 DeepSeek 发送消息', 'IconAttachment', 'agent-send-button']) {
if (aiPageSource.includes(forbidden)) failures.push(`project AI page contains unsupported chat control ${forbidden}`)
if (aiPageSource.includes('overview-head') || aiPageSource.includes('<Title heading=')) {
failures.push('project AI page must not render a title or subtitle header')
}
for (const forbidden of ['DeepSeek V4.0 Flash', '给 DeepSeek 发送消息']) {
if (aiPageSource.includes(forbidden)) failures.push(`project AI page contains outdated or borrowed copy ${forbidden}`)
}
const tasksPageSource = readFileSync('src/pages/projects/project-tasks.tsx', 'utf8')
for (const required of ['selectedTag', 'setSelectedTag', 'visibleTasks', 'task-tag-filter', 'aria-pressed']) {
if (!tasksPageSource.includes(required)) failures.push(`project tasks page must support tag filtering with ${required}`)
}
const explorePageSource = readFileSync('src/pages/workspace-explore.tsx', 'utf8')