@@ -94,10 +94,10 @@ export type TelemetryEvents = {
94
94
'ai/explain' : {
95
95
type : 'change' ;
96
96
changeType : 'wip' | 'stash' | 'commit' | `draft-${'patch' | 'stash' | 'suggested_pr_change' } `;
97
- } & AIEventBase ;
97
+ } & AIEventDataBase ;
98
98
99
99
/** Sent when generating summaries from commits, stashes, patches, etc. */
100
- 'ai/generate' : ( AIGenerateCommitEvent | AIGenerateDraftEvent ) & AIEventBase ;
100
+ 'ai/generate' : ( AIGenerateCommitEventData | AIGenerateDraftEventData ) & AIEventDataBase ;
101
101
102
102
/** Sent when connecting to one or more cloud-based integrations*/
103
103
'cloudIntegrations/connecting' : {
@@ -193,19 +193,13 @@ export type TelemetryEvents = {
193
193
} ;
194
194
195
195
/** Sent when a GitLens command is executed */
196
- command :
197
- | {
198
- command : Commands . GitCommands ;
199
- context ?: { mode ?: string ; submode ?: string } ;
200
- }
201
- | {
202
- command : string ;
203
- context ?: undefined ;
204
- webview ?: string ;
205
- } ;
196
+ command : CommandEventData ;
206
197
/** Sent when a VS Code command is executed by a GitLens provided action */
207
198
'command/core' : { command : string } ;
208
199
200
+ /** Sent when a "Graph" command is executed */
201
+ 'graph/command' : Omit < CommandEventData , 'context' > ;
202
+
209
203
/** Sent when the user takes an action on a launchpad item */
210
204
'launchpad/title/action' : LaunchpadEventData & {
211
205
action : 'feedback' | 'open-on-gkdev' | 'refresh' | 'settings' | 'connect' ;
@@ -389,7 +383,7 @@ export type TelemetryEvents = {
389
383
} ;
390
384
} ;
391
385
392
- type AIEventBase = {
386
+ type AIEventDataBase = {
393
387
'model.id' : AIModels ;
394
388
'model.provider.id' : AIProviders ;
395
389
'model.provider.name' : string ;
@@ -401,15 +395,32 @@ type AIEventBase = {
401
395
'failed.error' ?: string ;
402
396
} ;
403
397
404
- export type AIGenerateCommitEvent = {
398
+ export type AIGenerateCommitEventData = {
405
399
type : 'commitMessage' ;
406
400
} ;
407
401
408
- export type AIGenerateDraftEvent = {
402
+ export type AIGenerateDraftEventData = {
409
403
type : 'draftMessage' ;
410
404
draftType : 'patch' | 'stash' | 'suggested_pr_change' ;
411
405
} ;
412
406
407
+ export type CommandEventData =
408
+ | {
409
+ command : Commands . GitCommands ;
410
+ /** @deprecated Nested objects should not be used in telemetry */
411
+ context ?: { mode ?: string ; submode ?: string } ;
412
+ 'context.mode' ?: string ;
413
+ 'context.submode' ?: string ;
414
+ webview ?: string ;
415
+ }
416
+ | {
417
+ command : string ;
418
+ context ?: never ;
419
+ 'context.mode' ?: never ;
420
+ 'context.submode' ?: never ;
421
+ webview ?: string ;
422
+ } ;
423
+
413
424
export type LaunchpadTelemetryContext = LaunchpadEventData ;
414
425
415
426
type LaunchpadEventDataBase = {
0 commit comments