Repository navigation
feat(native-chat): suggest files on @ and name the triggers - #26017
Conversation
Shift+Enter and right-click no longer pick a row in the / menu either.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (36)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe native chat composer now loads workspace file suggestions for Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No actionable issue currently prevents merging the file-mention changes after normal checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the user-facing changes, implementation, rationale, testing, visual proof, and known limits. It does not include the required Linked Issue section or an actual issue reference. Full details: Docstring CoverageExplanation Docstring coverage is 6.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 30 files. (6 skipped: 6 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Looks great! 👍 |
ELI5
The chat box used to say "Send a message…" and gave no clue that
/and@do anything. Typing@only showed a strip repeating what you typed. Now the placeholder tells you about both, and typing@shows a list of files in the workspace that you can pick from.What Changed
Before
@showed a static strip, "Referencing file: @whatever-you-typed". It never looked at the workspace, so there was nothing to choose.After
@opens a list of workspace files above the chat box, recently opened files first, up to 20. Each row shows the file name with its folder beside it.@path(quoted if the path contains spaces).@word only, and does not interrupt the agent.How it works
@word; it just had nothing to show. That detection now carries the same "which word is this" key the/menu uses, so Escape and re-opening behave the same for both./menu, and the file row is the same one the tab bar's "new tab" search uses.Two small changes to the
/menu, because both menus now share the same key handling and row button:Why
People had no way to discover
/or@from the chat box, and@did nothing useful once found.Alternatives considered:
/menu already has the right look and keyboard behaviour, so the file list reuses it.@pathtext, which is what the agents read.Known limits, left for follow-ups:
Visual Proof
Before:

After:
https://github.com/user-attachments/assets/d3cb43f5-3fce-4a97-aca3-cbfd7dc71158
Testing
Unit tests cover: when the list opens and closes, what gets inserted (including quoting), Enter/Tab/Escape, Shift+Enter and Shift+Tab, Enter while loading, right-click, the empty/loading/error rows, and recalled messages.
A new end-to-end test drives the real app: type
@, see the files, filter, press Enter, check the inserted text, close with Escape, and confirm a new@opens the list again.Three existing tests that find the chat box by its placeholder text were updated.
Run on macOS only. SSH, Linux and Windows were not run; the file list on those goes through the same search Quick Open already uses there.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
@word in the chat box. With one open, ranking a 20,000-file workspace measured about 3.6 ms per keystroke.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)