From 50560b991207e2bb70a6e177f2c2e88949a01e6c Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 24 Jul 2024 17:08:33 -0700 Subject: [PATCH] Add telemetry for chat participant extension id (#223558) fix https://github.com/microsoft/vscode-copilot/issues/6889 --- src/vs/workbench/contrib/chat/common/chatServiceImpl.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts b/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts index ca288c4addb3c..68a88c6c79193 100644 --- a/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts +++ b/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts @@ -50,6 +50,7 @@ type ChatProviderInvokedEvent = { requestType: 'string' | 'followup' | 'slashCommand'; chatSessionId: string; agent: string; + agentExtensionId: string | undefined; slashCommand: string | undefined; location: ChatAgentLocation; citations: number; @@ -62,6 +63,7 @@ type ChatProviderInvokedClassification = { requestType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of request that the user made.' }; chatSessionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'A random ID for the session.' }; agent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of agent used.' }; + agentExtensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The extension that contributed the agent.' }; slashCommand?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of slashCommand used.' }; location: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The location at which chat request was made.' }; citations: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of public code citations that were returned with the response.' }; @@ -460,6 +462,7 @@ export class ChatService extends Disposable implements IChatService { result: 'cancelled', requestType, agent: agentPart?.agent.id ?? '', + agentExtensionId: agentPart?.agent.extensionId.value ?? '', slashCommand: agentSlashCommandPart ? agentSlashCommandPart.command.name : commandPart?.slashCommand.command, chatSessionId: model.sessionId, location, @@ -547,6 +550,7 @@ export class ChatService extends Disposable implements IChatService { result, requestType, agent: agentPart?.agent.id ?? '', + agentExtensionId: agentPart?.agent.extensionId.value ?? '', slashCommand: agentSlashCommandPart ? agentSlashCommandPart.command.name : commandPart?.slashCommand.command, chatSessionId: model.sessionId, location, @@ -571,6 +575,7 @@ export class ChatService extends Disposable implements IChatService { result, requestType, agent: agentPart?.agent.id ?? '', + agentExtensionId: agentPart?.agent.extensionId.value ?? '', slashCommand: agentSlashCommandPart ? agentSlashCommandPart.command.name : commandPart?.slashCommand.command, chatSessionId: model.sessionId, location,