claude-code - 💡(How to fix) Fix [FEATURE] Right-click to send selected code to chat [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60556Fetched 2026-05-20 03:55:31
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×2commented ×1mentioned ×1subscribed ×1

Fix Action

Fix / Workaround

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.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • 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

  1. I open a HTML/CSS file in Claude Code file viewer
  2. I select 10 lines of CSS that look wrong
  3. I right-click → "Ask Claude about this"
  4. Selected code is auto-inserted into chat — I type my question immediately
  5. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING