@@ -20,6 +20,7 @@ import { ContextKeyExpr, IContextKeyService } from '../../../../../platform/cont
2020import { IDialogService } from '../../../../../platform/dialogs/common/dialogs.js' ;
2121import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js' ;
2222import { KeybindingWeight } from '../../../../../platform/keybinding/common/keybindingsRegistry.js' ;
23+ import { IQuickInputService } from '../../../../../platform/quickinput/common/quickInput.js' ;
2324import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.js' ;
2425import { IRemoteCodingAgentsService } from '../../../remoteCodingAgents/common/remoteCodingAgentsService.js' ;
2526import { IChatAgentHistoryEntry , IChatAgentService } from '../../common/chatAgents.js' ;
@@ -598,11 +599,31 @@ export class CreateRemoteAgentJobAction extends Action2 {
598599 ) ;
599600
600601 const agents = remoteCodingAgent . getAvailableAgents ( ) ;
601- const agent = agents [ 0 ] ; // TODO: We just pick the first one for now
602- if ( ! agent ) {
602+ if ( agents . length === 0 ) {
603+ chatModel . completeResponse ( addedRequest ) ;
603604 return ;
604605 }
605606
607+ let agent = agents [ 0 ] ;
608+ if ( agents . length > 1 ) {
609+ const quickInputService = accessor . get ( IQuickInputService ) ;
610+ const pick = await quickInputService . pick (
611+ agents . map ( a => ( {
612+ label : a . displayName ,
613+ description : a . description ,
614+ agent : a ,
615+ } ) ) ,
616+ {
617+ title : localize ( 'selectCodingAgent' , "Select Coding Agent" ) ,
618+ }
619+ ) ;
620+ if ( ! pick ) {
621+ chatModel . completeResponse ( addedRequest ) ;
622+ return ;
623+ }
624+ agent = pick . agent ;
625+ }
626+
606627 let summary : string | undefined ;
607628 let followup : string | undefined ;
608629 if ( defaultAgent && chatRequests . length > 0 ) {
0 commit comments