[FEATURE] Smart paste: convert clipboard code to file reference chips (like Cursor)
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
Pasting copied code dumps the raw text inline into the chat input. There is no visual indication of which file or line range it came from.
Desired behavior
Copy code from an editor file → paste into Claude Code chat → shows a chip/pill like src/components/Button.tsx:L12-L45 instead of raw code
Clicking the chip shows the code preview
Support pasting multiple file snippets in a single message, each rendered as its own chip
The chip should carry the file path + line range so Claude receives structured context (not just raw text)
Proposed Solution
When pasting code that was copied from a file open in the editor, Claude Code should detect the source and convert it into a file reference chip (e.g., filename.ts:L1-L65) instead of inlining the raw code into the chat input.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗