Skip to content

Add minimal code lens for "Start Coding Agent Session" on TODO comments#7740

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-e0223ca9-3da0-4695-ae2c-3a60e0b30d0f
Closed

Add minimal code lens for "Start Coding Agent Session" on TODO comments#7740
Copilot wants to merge 2 commits intomainfrom
copilot/fix-e0223ca9-3da0-4695-ae2c-3a60e0b30d0f

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 2, 2025

Adds a simple code lens provider to show "Start Coding Agent Session" directly above TODO comments, making the coding agent feature more discoverable without duplicating existing functionality.

Changes Made

  • Extended IssueTodoProvider to implement CodeLensProvider interface alongside existing CodeActionProvider
  • Added minimal provideCodeLenses() method that only shows the coding agent session code lens (not duplicating create issue functionality)
  • Code lens appears above TODO comments when Copilot Remote Agent Manager is available
  • Reuses the same provider instance for both code actions and code lens registration

Behavior

The code lens complements the existing lightbulb code action by showing "Start Coding Agent Session" directly above TODO comments. Users can click the code lens or still use the quick fix menu - both trigger the same issue.startCodingAgentFromTodo command.

Example:

// TODO: Fix this bug
// ^ "Start Coding Agent Session" code lens appears here
function problematicFunction() {
    return null;
}

The implementation is minimal and focused - only adds the essential code lens functionality without changing existing behavior.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI requested a review from joshspicer September 2, 2025 21:43
@joshspicer joshspicer changed the title [WIP] In https://github.com/microsoft/vscode-pull-request-github/pull/7678 we added a new feature in issueTodoProvider.ts that provides acn action 'Start Coding Agent Session'. Extend this to also show code lens above any lines of code so that the feature i... code lens for coding agent TODO provider Sep 2, 2025
@joshspicer
Copy link
Copy Markdown
Member

@copilot try again

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 2, 2025

@copilot try again

Implemented code lens provider for TODO items! The extension now shows "Start Coding Agent Session" code lens directly above TODO comments, making the feature much more discoverable. The code lens appears alongside the existing code action and triggers the same command. (commit 387de91)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: node ./out/src/test/runTests.js src/test/issues/issueTodoProvider.test.ts (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title code lens for coding agent TODO provider Add code lens for "Start Coding Agent Session" on TODO comments Sep 2, 2025
@joshspicer
Copy link
Copy Markdown
Member

@copilot this is way too complicated. Do the minimal changes necessary

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 3, 2025

@copilot this is way too complicated. Do the minimal changes necessary

Made the changes minimal as requested. Now only adds the CodeLensProvider interface to the existing class and a simple provideCodeLenses method that shows "Start Coding Agent Session" above TODO comments. Only 3 files changed with focused functionality. (commit d4112f1)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: node ./out/src/test/runTests.js --grep IssueTodoProvider (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Add code lens for "Start Coding Agent Session" on TODO comments Add minimal code lens for "Start Coding Agent Session" on TODO comments Sep 3, 2025
Copy link
Copy Markdown
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshspicer, still want to do this one?

@joshspicer
Copy link
Copy Markdown
Member

joshspicer commented Oct 7, 2025

Thanks for the reminder - yes. I'll start over for maximum self-hosting

@joshspicer joshspicer closed this Oct 7, 2025
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.

3 participants