Cowork E: drop files into the chat (PDF, text, CSV, images) #66
Reference in New Issue
Block a user
Delete Branch "feat/cowork-file-drop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task E from
docs/cowork-ui-plan.md.What
POST /api/conversation/upload:process_imageconversations/<id>/files/, with the original name in object metadatastream-queryacceptsfile_key(restricted to the conversation's prefix). The text is extracted with PyMuPDF off the event loop (asyncio.to_thread), capped at 12k chars, and appended to the agent's turn as<attached file "…">…</attached>. The saved user message records📎 name.utils/file_extract.py, plus S3 helpers for non-image objects.pendingAttachment(an image or a file) replacespendingImage.disable_drag_drop_handler()so HTML5 drops reach the webview in the Tauri app.test-fixtures/cowork/mock-server.mjs.Follow-ups (pre-existing, out of scope)
stream-querystill doesn't check thatimage_keybelongs to the conversation.Test plan
pytest tests/ -q: 275 passed (extraction, 415/422, ownership/prefix checks, truncation)yarn build;tsc --noEmitclean;cargo buildindesktop/src-taurifile_keyin the request🤖 Generated with Claude Code