Skip to content

Commit

Permalink
Add telemetry for chat participant extension id (#223558)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens authored Jul 25, 2024
1 parent 79bddae commit 50560b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vs/workbench/contrib/chat/common/chatServiceImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ type ChatProviderInvokedEvent = {
requestType: 'string' | 'followup' | 'slashCommand';
chatSessionId: string;
agent: string;
agentExtensionId: string | undefined;
slashCommand: string | undefined;
location: ChatAgentLocation;
citations: number;
Expand All @@ -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.' };
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 50560b9

Please sign in to comment.