fix(core): ai image upload failed (#13405)

Close [AI-407](https://linear.app/affine-design/issue/AI-407)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Ensured that images included in the chat context are now properly sent
as attachments during AI chat interactions.

* **Tests**
* Enhanced chat tests to verify that the AI correctly identifies images
of kittens or cats in its responses.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Wu Yue
2025-08-04 17:29:36 +08:00
committed by GitHub
parent c31504baaf
commit 7a93db4d12
2 changed files with 7 additions and 1 deletions

View File

@@ -700,7 +700,7 @@ export class AIChatInput extends SignalWatcher(
: undefined,
},
docId: this.docId,
attachments: [],
attachments: images,
workspaceId: this.workspaceId,
stream: true,
signal: abortController.signal,