@@ -20,6 +20,7 @@ import { ContextKeyExpr, IContextKeyService } from '../../../../../platform/cont
20
20
import { IDialogService } from '../../../../../platform/dialogs/common/dialogs.js' ;
21
21
import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js' ;
22
22
import { KeybindingWeight } from '../../../../../platform/keybinding/common/keybindingsRegistry.js' ;
23
+ import { IQuickInputService } from '../../../../../platform/quickinput/common/quickInput.js' ;
23
24
import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.js' ;
24
25
import { IRemoteCodingAgentsService } from '../../../remoteCodingAgents/common/remoteCodingAgentsService.js' ;
25
26
import { IChatAgentHistoryEntry , IChatAgentService } from '../../common/chatAgents.js' ;
@@ -598,11 +599,31 @@ export class CreateRemoteAgentJobAction extends Action2 {
598
599
) ;
599
600
600
601
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 ) ;
603
604
return ;
604
605
}
605
606
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
+
606
627
let summary : string | undefined ;
607
628
let followup : string | undefined ;
608
629
if ( defaultAgent && chatRequests . length > 0 ) {
0 commit comments