feat(ai-analysis): 在AI助手展示业务分析结果

This commit is contained in:
2026-07-08 22:22:19 +08:00
parent c724446bbd
commit 6d2999085e
7 changed files with 261 additions and 29 deletions

View File

@@ -54,6 +54,23 @@ test('wenfan xiaobao page provides records, chat, and voice input surfaces', ()
assert.match(page, /: 'bg-white hover:bg-\[var\(--bg-subtle\)\]'/);
});
test('wenfan xiaobao page requests business analysis before preserving help fallback', () => {
const page = readFileSync(join(process.cwd(), 'app/wenfan-xiaobao/page.tsx'), 'utf8');
assert.match(page, /requestAnalysis/);
assert.match(page, /AnalysisResultBlock/);
assert.match(page, /type: 'analysis'/);
assert.match(page, /type: 'analysis_error'/);
assert.match(page, /currentPermissions/);
assert.match(page, /surface: 'ai_assistant'/);
assert.match(page, /业务分析只读取你已有权限的数据/);
assert.match(page, /业务分析暂不可用/);
assert.match(page, /searchHelpArticles\(question, WENFAN_HELP_ARTICLES\)/);
assert.match(page, /getFallbackHelpMessage\(showFallbackSuggestions\)/);
assert.match(page, /void askQuestion\(input\)/);
assert.match(page, /<AnalysisResultBlock response=\{message\.response\} onAsk=\{onAsk\} \/>/);
});
test('wenfan xiaobao page does not ship seeded conversation history', () => {
const page = readFileSync(join(process.cwd(), 'app/wenfan-xiaobao/page.tsx'), 'utf8');