Skip to content

Commit 50560b9

Browse files
authored
Add telemetry for chat participant extension id (microsoft#223558)
fix microsoft/vscode-copilot#6889
1 parent 79bddae commit 50560b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/vs/workbench/contrib/chat/common/chatServiceImpl.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type ChatProviderInvokedEvent = {
5050
requestType: 'string' | 'followup' | 'slashCommand';
5151
chatSessionId: string;
5252
agent: string;
53+
agentExtensionId: string | undefined;
5354
slashCommand: string | undefined;
5455
location: ChatAgentLocation;
5556
citations: number;
@@ -62,6 +63,7 @@ type ChatProviderInvokedClassification = {
6263
requestType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of request that the user made.' };
6364
chatSessionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'A random ID for the session.' };
6465
agent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of agent used.' };
66+
agentExtensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The extension that contributed the agent.' };
6567
slashCommand?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of slashCommand used.' };
6668
location: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The location at which chat request was made.' };
6769
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 {
460462
result: 'cancelled',
461463
requestType,
462464
agent: agentPart?.agent.id ?? '',
465+
agentExtensionId: agentPart?.agent.extensionId.value ?? '',
463466
slashCommand: agentSlashCommandPart ? agentSlashCommandPart.command.name : commandPart?.slashCommand.command,
464467
chatSessionId: model.sessionId,
465468
location,
@@ -547,6 +550,7 @@ export class ChatService extends Disposable implements IChatService {
547550
result,
548551
requestType,
549552
agent: agentPart?.agent.id ?? '',
553+
agentExtensionId: agentPart?.agent.extensionId.value ?? '',
550554
slashCommand: agentSlashCommandPart ? agentSlashCommandPart.command.name : commandPart?.slashCommand.command,
551555
chatSessionId: model.sessionId,
552556
location,
@@ -571,6 +575,7 @@ export class ChatService extends Disposable implements IChatService {
571575
result,
572576
requestType,
573577
agent: agentPart?.agent.id ?? '',
578+
agentExtensionId: agentPart?.agent.extensionId.value ?? '',
574579
slashCommand: agentSlashCommandPart ? agentSlashCommandPart.command.name : commandPart?.slashCommand.command,
575580
chatSessionId: model.sessionId,
576581
location,

0 commit comments

Comments
 (0)