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] Inline Editor Code Lenses for AI Actions in VS Code Extension #750
Add "Code Lenses" (clickable text above functions or classes) directly inside the VS Code text editor that trigger VS Code extension AI actions.
Use Case
Users often see a piece of code in their editor and want to interact with the AI about it. Switching to the VS Code extension sidebar and copying/pasting the code is slow.
Proposed Solution
Display small code lenses like [Explain Code] or [Generate Tests] above function definitions. Clicking a lens programmatically opens the webview chat panel, populates the input, and sends the prompt with the selected code as context.
Alternatives Considered
Relying solely on right-click context menus, which are less discoverable than code lenses.
Additional Context
I have searched existing issues to ensure this is not a duplicate
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/
Backend: Implement a standard vscode.CodeLensProvider in the plugins/vscode/src/ directory. The command attached to the lens should trigger an extension command that communicates with plugins/vscode/src/chat-webview-provider.ts to focus the webview and set the chat-input value.
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!
how I'm thinking of doing it: VS Code already knows where every function and class in a file is, so no need to scan the code myself....that way it just works for whatever language user's in.
Above each there'll be links, Explain Code and Generate Tests.
Click one and it opens the Nanocoder chat and sends that function with the question
Hey @addyCooks, you’re already assigned to another issue. Once that’s fixed and the PR is merged, you can take on another one. Thanks for understanding!
Hey @akramcodez,
My previous issue is now completed and the PR is up for review.
If it’s okay, I’d love to work on this one in parallel while that PR is being reviewed.
Happy to wait for your go-ahead!
Activity
feat(vscode): add Explain Code / Generate Tests code lenses
addyCooks commentedon Aug 11, 2026
@akramcodez Could I be assigned this one?
how I'm thinking of doing it: VS Code already knows where every function and class in a file is, so no need to scan the code myself....that way it just works for whatever language user's in.
Above each there'll be links,
Explain CodeandGenerate Tests.Click one and it opens the Nanocoder chat and sends that function with the question
wdyt?
akramcodez commentedon Aug 11, 2026
Hey @addyCooks, you’re already assigned to another issue. Once that’s fixed and the PR is merged, you can take on another one. Thanks for understanding!
addyCooks commentedon Aug 11, 2026
@akramcodez
Got it,
thanks for letting me know! I’ll focus on my current issue first.
addyCooks commentedon Aug 12, 2026
Hey @akramcodez,
My previous issue is now completed and the PR is up for review.
If it’s okay, I’d love to work on this one in parallel while that PR is being reviewed.
Happy to wait for your go-ahead!
add Explain Code / Generate Tests code lenses (Nano-Collective#866)
Resolve conflicts with upstream main for timeline undo (#3)