You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: Line selection in file view to reference in prompts #10019
Add the ability to select lines in the file view panel and reference them in prompts. When lines are selected, show an indicator in the prompt area displaying "selected lines X-Y from filename" which gets included as context when sending a message.
Motivation
When discussing code changes or asking questions about specific parts of a file, it's currently necessary to manually type file paths and line numbers or copy-paste code snippets. Line selection would allow users to:
Precisely reference code sections when requesting edits
Ask clarifying questions about specific lines
Provide targeted context without copying code into the prompt
Proposed UX
Selection: Click and drag in the file view to select a line range (single file only, new selection replaces previous)
Indicator: Show a dismissible indicator in the prompt area:
[file icon] lines 13-14 from config.ts [x]
Submit behavior: When sending a message with a selection, prepend context like:
> selected lines 13-14 from config.ts
[user's message]
Clear selection:
Click the X on the indicator
Press Escape
Auto-clear after submitting a message
Current State
The infrastructure partially exists:
Code component already has enableLineSelection and selectedLines props
FileProvider tracks selectedLines per file
session.tsx passes onLineSelected callback to Code
The gap is surfacing the selection state in the prompt area.
Implementation Notes
Main files to modify:
New SelectionIndicator component
prompt-input.tsx - display indicator, include selection in submit
Activity
github-actions commentedon Jan 22, 2026
For keybind-related issues, please also check our pinned keybinds documentation: #4997
kyashrathore commentedon Jan 23, 2026
WIP in #7008 so closing.