Skip to content

[Feature] Inline Editor Code Lenses for AI Actions in VS Code Extension #750

Closed

Description

@akramcodez

Description

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!

Activity

  1. added a commit that references this issue on Aug 11, 2026
    cbb490a
  2. addyCooks commented on Aug 11, 2026

    @addyCooks
    Collaborator

    @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 Code and Generate Tests.
    Click one and it opens the Nanocoder chat and sends that function with the question

    wdyt?

  3. akramcodez commented on Aug 11, 2026

    @akramcodez
    MemberAuthor

    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!

  4. addyCooks commented on Aug 11, 2026

    @addyCooks
    Collaborator

    @akramcodez
    Got it,
    thanks for letting me know! I’ll focus on my current issue first.

  5. addyCooks commented on Aug 12, 2026

    @addyCooks
    Collaborator

    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!

  6. added a commit that references this issue on Aug 20, 2026
    dfaf009
  7. added a commit that references this issue on Aug 21, 2026
    4e11490
  8. added
    area:vscode
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:vscodeenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions