[FEATURE] Right-click to send selected code to chat
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
When reviewing code in Claude Code's file viewer, I have to manually copy-paste code snippets or type @filename:line references to ask Claude about specific lines. This breaks the dev loop and slows down debugging significantly.
Proposed Solution
Add a right-click context menu on selected code in the file viewer with an option "Ask Claude". When clicked, the selected code is automatically inserted into the chat input, with the cursor ready to type a question — no copy-paste needed.
Alternative Solutions
Currently workaround is manual copy-paste or typing @filename:line references. Cursor and GitHub Copilot both support right-click-to-chat natively, which is significantly faster.
Priority
High - Significant impact on productivity
Feature Category
Developer tools/SDK
Use Case Example
- I open a HTML/CSS file in Claude Code file viewer
- I select 10 lines of CSS that look wrong
- I right-click → "Ask Claude about this"
- Selected code is auto-inserted into chat — I type my question immediately
- No copy-paste, no context-switching needed
Additional Context
Similar features exist in: Cursor, GitHub Copilot, Windsurf. This would significantly reduce context-switching and keep the dev loop entirely inside Claude Code. Should work in both the desktop app and IDE extensions.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗