diff --git a/packages/frontend/core/src/blocksuite/ai/components/ai-chat-input/ai-chat-input.ts b/packages/frontend/core/src/blocksuite/ai/components/ai-chat-input/ai-chat-input.ts index ed40abcfe9..f626db7362 100644 --- a/packages/frontend/core/src/blocksuite/ai/components/ai-chat-input/ai-chat-input.ts +++ b/packages/frontend/core/src/blocksuite/ai/components/ai-chat-input/ai-chat-input.ts @@ -700,7 +700,7 @@ export class AIChatInput extends SignalWatcher( : undefined, }, docId: this.docId, - attachments: [], + attachments: images, workspaceId: this.workspaceId, stream: true, signal: abortController.signal, diff --git a/tests/affine-cloud-copilot/e2e/chat-with/image.spec.ts b/tests/affine-cloud-copilot/e2e/chat-with/image.spec.ts index e0b13001f8..fbf94b5d5c 100644 --- a/tests/affine-cloud-copilot/e2e/chat-with/image.spec.ts +++ b/tests/affine-cloud-copilot/e2e/chat-with/image.spec.ts @@ -36,6 +36,12 @@ test.describe('AIChatWith/Image', () => { status: 'success', }, ]); + + const { content } = await utils.chatPanel.getLatestAssistantMessage(page); + await expect( + content.toLowerCase().includes('kitten') || + content.toLowerCase().includes('cat') + ).toBe(true); }); test('support chat with mutiple images', async ({