@@ -45,6 +45,7 @@ const CONTINUE_AND_DO_NOT_ASK_AGAIN = vscode.l10n.t('Continue and don\'t ask aga
4545
4646const CONTINUE_TRUNCATION = vscode . l10n . t ( 'Continue with truncation' ) ;
4747const DELEGATE_MODAL_DETAILS = vscode . l10n . t ( 'The agent will work asynchronously to create a pull request with your requested changes.' ) ;
48+ const DISABLE_CODELENS = vscode . l10n . t ( 'Disable Code Lens' ) ;
4849
4950const COPILOT = '@copilot' ;
5051
@@ -605,16 +606,19 @@ export class CopilotRemoteAgentManager extends Disposable {
605606 const message = vscode . l10n . t ( 'Copilot coding agent will continue your work in \'{0}\'.' , repoName ) ;
606607 const detail = DELEGATE_MODAL_DETAILS ;
607608 if ( source !== 'prompt' && hasChanges && CopilotRemoteAgentConfig . getAutoCommitAndPushEnabled ( ) ) {
608- // Pending changes modal
609+
610+ const buttons = [ PUSH_CHANGES , CONTINUE_WITHOUT_PUSHING , LEARN_MORE ] ;
611+ if ( source === 'todo' ) {
612+ buttons . push ( DISABLE_CODELENS ) ;
613+ }
614+
609615 const modalResult = await vscode . window . showInformationMessage (
610616 message ,
611617 {
612618 modal : true ,
613619 detail,
614620 } ,
615- PUSH_CHANGES ,
616- CONTINUE_WITHOUT_PUSHING ,
617- LEARN_MORE ,
621+ ...buttons ,
618622 ) ;
619623
620624 if ( ! modalResult ) {
@@ -632,6 +636,11 @@ export class CopilotRemoteAgentManager extends Disposable {
632636 return ;
633637 }
634638
639+ if ( modalResult === DISABLE_CODELENS ) {
640+ vscode . commands . executeCommand ( 'workbench.action.openSettings' , 'githubPullRequests.codingAgent.codeLens' ) ;
641+ return ;
642+ }
643+
635644 if ( modalResult === PUSH_CHANGES ) {
636645 autoPushAndCommit = true ;
637646 }
0 commit comments