diff --git a/src/vs/workbench/api/browser/mainThreadChatDebug.ts b/src/vs/workbench/api/browser/mainThreadChatDebug.ts index d36be258647..82594dcb038 100644 --- a/src/vs/workbench/api/browser/mainThreadChatDebug.ts +++ b/src/vs/workbench/api/browser/mainThreadChatDebug.ts @@ -83,6 +83,7 @@ export class MainThreadChatDebug extends Disposable implements MainThreadChatDeb ...base, kind: 'modelTurn', model: dto.model, + requestName: dto.requestName, inputTokens: dto.inputTokens, outputTokens: dto.outputTokens, totalTokens: dto.totalTokens, diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 3fc7572a3a9..8abfea0b8d3 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -1415,6 +1415,7 @@ export interface IChatDebugToolCallEventDto extends IChatDebugEventCommonDto { export interface IChatDebugModelTurnEventDto extends IChatDebugEventCommonDto { readonly kind: 'modelTurn'; readonly model?: string; + readonly requestName?: string; readonly inputTokens?: number; readonly outputTokens?: number; readonly totalTokens?: number; diff --git a/src/vs/workbench/api/common/extHostChatDebug.ts b/src/vs/workbench/api/common/extHostChatDebug.ts index fd4994cdaf0..04125f3e551 100644 --- a/src/vs/workbench/api/common/extHostChatDebug.ts +++ b/src/vs/workbench/api/common/extHostChatDebug.ts @@ -145,6 +145,7 @@ export class ExtHostChatDebug extends Disposable implements ExtHostChatDebugShap ...base, kind: 'modelTurn', model: e.model, + requestName: e.requestName, inputTokens: e.inputTokens, outputTokens: e.outputTokens, totalTokens: e.totalTokens, diff --git a/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.ts b/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.ts index a88d4a37003..9797275555b 100644 --- a/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.ts +++ b/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.ts @@ -45,9 +45,10 @@ function renderEventToTemplate(element: IChatDebugEvent, templateData: IChatDebu break; case 'modelTurn': templateData.name.textContent = safeStr(element.model) || localize('chatDebug.modelTurn', "Model Turn"); - templateData.details.textContent = element.totalTokens !== undefined - ? localize('chatDebug.tokens', "{0} tokens", element.totalTokens) - : ''; + templateData.details.textContent = [ + safeStr(element.requestName), + element.totalTokens !== undefined ? localize('chatDebug.tokens', "{0} tokens", element.totalTokens) : '', + ].filter(Boolean).join(' \u00b7 '); break; case 'generic': templateData.name.textContent = safeStr(element.name, localize('chatDebug.unknownEvent', "(unknown)")); diff --git a/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.ts b/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.ts index 6cfe024552c..528e3a5d291 100644 --- a/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.ts +++ b/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.ts @@ -549,6 +549,9 @@ function getEventSublabel(event: IChatDebugEvent, effectiveKind?: IChatDebugEven switch (kind) { case 'modelTurn': { const parts: string[] = []; + if (event.kind === 'modelTurn' && event.requestName) { + parts.push(event.requestName); + } if (event.kind === 'modelTurn' && event.totalTokens) { parts.push(localize('tokenCount', "{0} tokens", event.totalTokens)); } diff --git a/src/vs/workbench/contrib/chat/common/chatDebugService.ts b/src/vs/workbench/contrib/chat/common/chatDebugService.ts index a4028bf9823..a50c09b18a1 100644 --- a/src/vs/workbench/contrib/chat/common/chatDebugService.ts +++ b/src/vs/workbench/contrib/chat/common/chatDebugService.ts @@ -48,6 +48,7 @@ export interface IChatDebugToolCallEvent extends IChatDebugEventCommon { export interface IChatDebugModelTurnEvent extends IChatDebugEventCommon { readonly kind: 'modelTurn'; readonly model?: string; + readonly requestName?: string; readonly inputTokens?: number; readonly outputTokens?: number; readonly totalTokens?: number;