[FEATURE] Right-click to send selected code to chat

Resolved 💬 3 comments Opened May 19, 2026 by nhatminhhsc Closed May 23, 2026

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

  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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗