Skip to content

feat: mention selected file lines with Cmd+I#219

Merged
agegr merged 2 commits into
agegr:mainfrom
opsCar:feat/file-line-mentions
Jul 25, 2026
Merged

feat: mention selected file lines with Cmd+I#219
agegr merged 2 commits into
agegr:mainfrom
opsCar:feat/file-line-mentions

Conversation

@opsCar

@opsCar opsCar commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • Add Cmd+I on macOS and Ctrl+I on Windows/Linux to mention the currently selected source lines in the chat prompt.
  • Reuse the existing chat-input insertion path and @mention formatting, including quoted paths with spaces and inclusive single-line or multi-line ranges.
  • Map native browser selections back to logical source lines, including exact line-boundary selections and wrapped lines.
  • Ignore the shortcut outside the visible Source view, inside editable controls, and for repeated keydown events.

Examples:

@components/AppShell.tsx:154
@components/FileViewer.tsx:80-120
@"project files/app.ts":3-9

Validation

  • node_modules/.bin/tsc --noEmit
  • npm run lint
  • node --test lib/*.test.mjs components/*.test.mjs — 102 tests passed
  • git diff --check origin/main...HEAD

Notes

  • Preview, Diff, image, audio, and document views do not handle this shortcut because they do not expose source-line selections.
  • next build was intentionally not run, following the repository's development guidance.

@opsCar
opsCar force-pushed the feat/file-line-mentions branch from c038b1a to a3810ba Compare July 24, 2026 01:43
@agegr
agegr merged commit 97e80ce into agegr:main Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants