diff --git a/src/vs/workbench/contrib/chat/browser/chatEditor.ts b/src/vs/workbench/contrib/chat/browser/chatEditor.ts index 430ed852010..88acc8e6743 100644 --- a/src/vs/workbench/contrib/chat/browser/chatEditor.ts +++ b/src/vs/workbench/contrib/chat/browser/chatEditor.ts @@ -130,6 +130,7 @@ export class ChatEditor extends EditorPane { if (input.resource.scheme === Schemas.vscodeChatSession) { const identifier = ChatSessionUri.parse(input.resource); if (identifier) { + await this.chatSessionsService.canResolveContentProvider(input.resource.authority); const contributions = this.chatSessionsService.getChatSessionContributions(); const contribution = contributions.find(c => c.type === identifier.chatSessionType); if (contribution) { diff --git a/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts b/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts index 8aa32ae9de1..4bfa50506bf 100644 --- a/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts +++ b/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts @@ -310,6 +310,8 @@ export class ChatSessionsService extends Disposable implements IChatSessionsServ } async canResolveItemProvider(chatViewType: string) { + await this._extensionService.whenInstalledExtensionsRegistered(); + // First check if the contribution is available based on its when clause const contribution = this._contributions.get(chatViewType); if (contribution && !this._isContributionAvailable(contribution)) { @@ -320,9 +322,7 @@ export class ChatSessionsService extends Disposable implements IChatSessionsServ return true; } - await this._extensionService.whenInstalledExtensionsRegistered(); await this._extensionService.activateByEvent(`onChatSession:${chatViewType}`); - return this._itemsProviders.has(chatViewType); } @@ -331,6 +331,8 @@ export class ChatSessionsService extends Disposable implements IChatSessionsServ } async canResolveContentProvider(chatViewType: string) { + await this._extensionService.whenInstalledExtensionsRegistered(); + // First check if the contribution is available based on its when clause const contribution = this._contributions.get(chatViewType); if (contribution && !this._isContributionAvailable(contribution)) { @@ -341,9 +343,7 @@ export class ChatSessionsService extends Disposable implements IChatSessionsServ return true; } - await this._extensionService.whenInstalledExtensionsRegistered(); await this._extensionService.activateByEvent(`onChatSession:${chatViewType}`); - return this._contentProviders.has(chatViewType); }