[Feature] Context-Aware Mentions (`@` referencing) in VS Code Extension
Description
Implement an @ mention system inside the VS Code extension's chat input field, allowing users to explicitly attach specific context to their prompt.
Use Case
When a codebase is large, the AI shouldn't automatically send the entire context. Users of the VS Code extension need a fast, intuitive way to tell the AI exactly which files, open editors, or folders to look at for a specific prompt.
Proposed Solution
Typing @ in the chat-input textarea should display a floating autocomplete dropdown. Users can search and select workspace files, folders, or terminal outputs. The selected context is appended to the payload sent to the AI.
Alternatives Considered
- A separate "Attach Context" button that opens a native file picker, but this breaks the user's typing flow.
Additional Context
- [x] I have searched existing issues to ensure this is not a duplicate
- [x] This feature aligns with the project's goals (local-first AI assistance)
- Target Component: VS Code Extension (
plugins/vscode/)
Implementation Notes (optional)
- Folder Path:
plugins/vscode/ - UI: Use a webview-side floating dropdown in
plugins/vscode/media/chat-panel.htmlsimilar to the existing provider/model dropdowns. - Backend: The extension needs a message listener in
plugins/vscode/src/chat-webview-provider.tsto query the workspace for file paths and return them to the webview for autocomplete filtering.
Contribution Guidelines
- If you would like to work on this issue, please comment below to ask for assignment first.
- Before opening a Pull Request, please briefly share your implementation plan in this thread so we can align on the approach!
@akramcodez i’d like to pick this up! before writing anything, i kinda went through it and found that most of the context pipeline for this already exists behind the attach button. imo, rather than building a parallel path, we could just make a second entry point into what’s already there… wdyt? (and do mention me on other issues you think i could help with!)
Yeah @addyCooks go for it, that makes sense. Reusing the existing context pipeline as a second entry point sounds like the better approach.
@akramcodez sure, pushing up!