File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/vs/workbench/contrib/chat/common Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -338,14 +338,14 @@ export class ChatService extends Disposable implements IChatService {
338
338
model . startInitialize ( ) ;
339
339
340
340
await this . extensionService . whenInstalledExtensionsRegistered ( ) ;
341
- const defaultAgentData = this . chatAgentService . getContributedDefaultAgent ( model . initialLocation ) ;
341
+ const defaultAgentData = this . chatAgentService . getContributedDefaultAgent ( model . initialLocation ) ?? this . chatAgentService . getContributedDefaultAgent ( ChatAgentLocation . Panel ) ;
342
342
if ( ! defaultAgentData ) {
343
343
throw new ErrorNoTelemetry ( 'No default agent contributed' ) ;
344
344
}
345
345
346
346
await this . extensionService . activateByEvent ( `onChatParticipant:${ defaultAgentData . id } ` ) ;
347
347
348
- const defaultAgent = this . chatAgentService . getDefaultAgent ( model . initialLocation ) ;
348
+ const defaultAgent = this . chatAgentService . getActivatedAgents ( ) . find ( agent => agent . id === defaultAgentData . id ) ;
349
349
if ( ! defaultAgent ) {
350
350
// Should have been registered during activation above!
351
351
throw new ErrorNoTelemetry ( 'No default agent registered' ) ;
You can’t perform that action at this time.
0 commit comments