fix: 🚑 replace problematic attachment count (#13416)

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved attachment handling in chat by updating the way attachments
are counted, ensuring only files and images are included. Document
attachments are no longer counted in this process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Lakr
2025-08-06 09:37:37 +08:00
committed by GitHub
parent 6ffa60c501
commit 531fbf0eed

View File

@@ -171,7 +171,7 @@ private extension ChatManager {
]
let attachmentCount = [
editorData.fileAttachments.count,
editorData.documentAttachments.count,
editorData.imageAttachments.count,
].reduce(0, +)
let attachmentFieldName = attachmentCount > 1 && attachmentCount != 0 ? "options.blobs" : "options.blob"
let uploadableAttachments: [GraphQLFile] = [