Skip to content

Add drag & drop for images and file references#201

Open
leonidasbarkas98-cpu wants to merge 2 commits into
andrepimenta:mainfrom
leonidasbarkas98-cpu:feat/drag-and-drop
Open

Add drag & drop for images and file references#201
leonidasbarkas98-cpu wants to merge 2 commits into
andrepimenta:mainfrom
leonidasbarkas98-cpu:feat/drag-and-drop

Conversation

@leonidasbarkas98-cpu

Copy link
Copy Markdown

Dropping OS image files onto the chat reuses the existing image/paste pipeline; dropping files from the VS Code explorer inserts @-references. Includes type gating, drag-highlight reset on dragend/blur, and a toast for remote (non-file://) URIs.

Fixes #185
Fixes #80
Fixes #54
Fixes #119
Also helps with the drag & drop part of #166.

🤖 Generated with Claude Code

Jonas Kunert and others added 2 commits July 22, 2026 07:17
Dropping image files from the OS reuses the existing createImageFile/
imageAttached paste pipeline; dropping files/tabs from the VS Code
explorer inserts an @-file reference into the message input instead,
since no file content is available for those drops. Adds a dashed
drag-over highlight on the input container.

Upstream andrepimenta#185, andrepimenta#80, andrepimenta#54, andrepimenta#119

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…edback

Only react to drags that actually carry Files or text/uri-list (checked
via dataTransfer.types) so native in-textarea text drag/drop keeps
working instead of being swallowed. Add a shared resetDragState(),
wired to window 'dragend'/'blur' as a safety net for cases where
dragleave doesn't fire across webview/iframe boundaries (dropping
outside the panel, aborting with Esc). Show a toast when a dropped
uri-list contains no local file:// entries (e.g. untitled:,
vscode-remote:// on SSH/WSL workspaces) instead of failing silently.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant