feat: AI 对话支持 A2UI 表单/审查/图表与 Agent 工具

This commit is contained in:
2026-08-05 17:11:00 +08:00
parent 644c35ce53
commit 0e6e3e2d96
64 changed files with 8395 additions and 6434 deletions

View File

@@ -44,7 +44,7 @@ describe('AI chat SSE message reducer', () => {
expect(message.toolRuns[0]).toMatchObject({ status: 'success', summary: '找到 1 条记录' });
});
it('tracks processed attachments and final feedback state', () => {
it('tracks processed attachments and final message state', () => {
let message = reduceAiSseMessage(undefined, {
event: 'attachment.processed',
data: JSON.stringify({
@@ -66,13 +66,11 @@ describe('AI chat SSE message reducer', () => {
id: 12,
content: '完成',
reasoningContent: null,
feedback: 'like',
attachments: message.attachments,
},
}),
});
expect(message.attachments).toHaveLength(1);
expect(message.feedback).toBe('like');
});
it('uses final content and records cancellation and errors', () => {