From 7fa6deee69faf24b2d47ad07dad67553f99ab101 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 1 Apr 2026 16:43:31 +0200 Subject: [PATCH] update --- .../contrib/chat/browser/promptsDebugContribution.ts | 10 +++++----- .../contrib/chat/common/chatService/chatService.ts | 2 +- .../contrib/chat/common/chatService/chatServiceImpl.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.ts b/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.ts index 4af54ad0288..a279a2341ea 100644 --- a/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.ts +++ b/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.ts @@ -43,9 +43,9 @@ export class PromptsDebugContribution extends Disposable implements IWorkbenchCo const cts = new CancellationTokenSource(); try { - for (const promptType of [PromptsType.agent, PromptsType.instructions, PromptsType.prompt, PromptsType.skill, PromptsType.hook]) { - const discoveryInfo = await this.promptsService.getDiscoveryInfo(promptType, cts.token); - const { name, details } = this.getDiscoveryLogEntry(promptType, discoveryInfo); + const discoveryInfos = await Promise.all([PromptsType.agent, PromptsType.instructions, PromptsType.prompt, PromptsType.skill, PromptsType.hook].map(type => this.promptsService.getDiscoveryInfo(type, cts.token))); + for (const discoveryInfo of discoveryInfos) { + const { name, details } = this.getDiscoveryLogEntry(discoveryInfo); const eventId = generateUuid(); this._discoveryEventDetails.set(eventId, discoveryInfo); @@ -108,13 +108,13 @@ export class PromptsDebugContribution extends Disposable implements IWorkbenchCo })); } - private getDiscoveryLogEntry(promptType: PromptsType, discoveryInfo: IPromptDiscoveryInfo): { readonly name: string; readonly details?: string } { + private getDiscoveryLogEntry(discoveryInfo: IPromptDiscoveryInfo): { readonly name: string; readonly details?: string } { const durationInMillis = discoveryInfo.durationInMillis; const loadedCount = discoveryInfo.files.filter(file => file.status === 'loaded').length; const skippedCount = discoveryInfo.files.length - loadedCount; - switch (promptType) { + switch (discoveryInfo.type) { case PromptsType.prompt: return { name: localize('promptsService.loadSlashCommands', 'Load Slash Commands'), diff --git a/src/vs/workbench/contrib/chat/common/chatService/chatService.ts b/src/vs/workbench/contrib/chat/common/chatService/chatService.ts index 5000b8fc793..79201b41d44 100644 --- a/src/vs/workbench/contrib/chat/common/chatService/chatService.ts +++ b/src/vs/workbench/contrib/chat/common/chatService/chatService.ts @@ -1407,7 +1407,7 @@ export interface IChatService { _serviceBrand: undefined; transferredSessionResource: URI | undefined; - readonly onDidSubmitRequest: Event<{ readonly chatSessionResource: URI; readonly message?: IParsedChatRequest; readonly options?: Readonly }>; + readonly onDidSubmitRequest: Event<{ readonly chatSessionResource: URI; readonly message?: IParsedChatRequest }>; readonly onDidCreateModel: Event; diff --git a/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts b/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts index c8d68f3eca3..34dcc58ebd8 100644 --- a/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts +++ b/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts @@ -114,7 +114,7 @@ export class ChatService extends Disposable implements IChatService { return this._transferredSessionResource; } - private readonly _onDidSubmitRequest = this._register(new Emitter<{ readonly chatSessionResource: URI; readonly message?: IParsedChatRequest; readonly options?: Readonly }>()); + private readonly _onDidSubmitRequest = this._register(new Emitter<{ readonly chatSessionResource: URI; readonly message?: IParsedChatRequest }>()); public readonly onDidSubmitRequest = this._onDidSubmitRequest.event; public get onDidCreateModel() { return this._sessionModels.onDidCreateModel; } @@ -1427,7 +1427,7 @@ export class ChatService extends Disposable implements IChatService { if (options?.userSelectedModelId) { this.languageModelsService.addToRecentlyUsedList(options.userSelectedModelId); } - this._onDidSubmitRequest.fire({ chatSessionResource: model.sessionResource, message: parsedRequest, options: options }); + this._onDidSubmitRequest.fire({ chatSessionResource: model.sessionResource, message: parsedRequest }); return { responseCreatedPromise: responseCreated.p, responseCompletePromise: rawResponsePromise,