[FEATURE] Dragging a folder into the prompt inserts nothing
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Dragging a folder onto the prompt inserts nothing at all. No path, no reference,
no character. A dropped file at least pastes its path. A dropped folder leaves
the input exactly as it was, with no message saying why.
The folder reference already exists and already works: @src/ expands to a
listing of the files inside. Measured on 2.1.278, asking for the file names
inside @src/ with every reading tool disallowed returned all six. So this is
not a request for new syntax, only that the drop produce syntax that is there.
The IDE extension does support dropping folders, per the changelog entry quoted
in #73853, "IDE: Add
drag-and-drop support for files and folders in chat". The terminal and the IDE
differ.
Proposed Solution
A dropped folder inserts @ followed by the folder's path.
- Nothing is loaded recursively. The existing listing is the right amount.
Reading the contents of every file in the folder would be wrong.
- A bare path is an acceptable outcome too, if a folder reference is the
wrong default. Anything beats nothing.
- The same modifier that forces a bare path for a file does the same here.
Alternative Solutions
Type the path out. The thing dragging exists to avoid, and a deep path is
where the typo happens.
Type @ and pick from the suggestion list. Works for a tracked folder, and
never offers a git-ignored one.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
- I want Claude to look over a directory of migration scripts, so I drag the
folder from my editor onto the terminal.
- Nothing appears in the input. The drag did not register, and nothing says so.
- I type the path out instead, and Claude spends a turn listing the folder
before it can start.
- With this change the drop inserts
@/home/me/app/db/migrations, the listing
arrives with the prompt, and the first turn is the work.
Additional Context
Claude Code 2.1.278, Linux, WSL2.
Filed alongside: a dragged file inserts a bare path rather than an @
reference. Same handler, different defects: a file inserts the wrong thing, a
folder inserts nothing.