Fix file attachment API format and duplicate attachments

- Add required 'url' field to file parts in API request
- Use url, mime, filename instead of path field
- Prevent duplicate attachments by checking if path already exists
- Show all files when picker opens with empty query (use space as query)
- Filter git files only when search query provided
- Enter key now works correctly when file list has items
This commit is contained in:
Shantur Rathore
2025-10-24 00:47:02 +01:00
parent 2629276229
commit 26ab3e066f
3 changed files with 17 additions and 14 deletions

View File

@@ -652,8 +652,9 @@ async function sendMessage(
if (source.type === "file") {
parts.push({
type: "file" as const,
path: source.path,
url: att.url,
mime: source.mime,
filename: att.filename,
})
} else if (source.type === "text") {
parts.push({