Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot 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 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
Member

@copilot try again

Copy link
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 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
Copilot finished work on behalf of joshspicer September 2, 2025 22:16
@joshspicer
Copy link
Member

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

Copy link
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 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
Copilot finished work on behalf of joshspicer September 3, 2025 23:58
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.

2 participants