Skip to content

feat(chat): insert file path into input on non-image drag-and-drop#218

Open
BowgartField wants to merge 1 commit intocoollabsio:mainfrom
BowgartField:feat/drag-drop-file-paths
Open

feat(chat): insert file path into input on non-image drag-and-drop#218
BowgartField wants to merge 1 commit intocoollabsio:mainfrom
BowgartField:feat/drag-drop-file-paths

Conversation

@BowgartField
Copy link
Copy Markdown
Contributor

@BowgartField BowgartField commented Mar 17, 2026

Summary

  • Previously, dropping non-image files into the chat window showed an error toast ("Only images are accepted")
  • Now, non-image file paths are inserted (double-quoted) directly into the chat input, so Claude can reference them
  • Images continue to be processed as attachments as before

Changes

  • useDragAndDropImages.ts — Collect non-image paths in otherPaths array instead of showing error/warning toasts; expose droppedFilePaths and clearDroppedFilePaths
  • ChatWindow.tsx — Wire new props from the hook to ChatInput
  • ChatInput.tsx — New droppedFilePaths prop + useEffect that inserts quoted paths into the textarea and updates draft state

Test plan

  • Drop a non-image file (e.g. .rs, .txt, .json) → its absolute path appears quoted in the input
  • Drop an image (PNG, JPEG, etc.) → still processed as image attachment
  • Drop a mix of images and non-images → images attached, non-image paths inserted
  • Drop multiple non-image files → all paths inserted space-separated

Previously dropping non-image files showed an error toast. Now their
absolute paths (double-quoted) are inserted into the chat input so
Claude can reference them directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants