File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
plus/webviews/patchDetails Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -1284,6 +1284,15 @@ export type TelemetryEvents = {
1284
1284
/** Sent when a VS Code command is executed by a GitLens provided action */
1285
1285
'command/core' : { command : string } ;
1286
1286
1287
+ /** Sent when explaining changes from */
1288
+ explainChanges : {
1289
+ changeType : 'wip' | 'stash' | 'commit' | `draft-${'patch' | 'stash' | 'suggested_pr_change' } `;
1290
+ } ;
1291
+
1292
+ generateDraftMessage : {
1293
+ draftType : 'patch' | 'stash' | 'suggested_pr_change' ;
1294
+ } ;
1295
+
1287
1296
/** Sent when the user takes an action on a launchpad item */
1288
1297
'launchpad/title/action' : LaunchpadEventData & {
1289
1298
action : 'feedback' | 'open-on-gkdev' | 'refresh' | 'settings' ;
Original file line number Diff line number Diff line change @@ -822,6 +822,14 @@ export class PatchDetailsWebviewProvider
822
822
if ( summary == null ) throw new Error ( 'Error retrieving content' ) ;
823
823
824
824
params = { summary : summary } ;
825
+
826
+ this . container . telemetry . sendEvent (
827
+ 'explainChanges' ,
828
+ {
829
+ changeType : `draft-${ this . _context . draft . type } ` ,
830
+ } ,
831
+ { source : 'patchDetails' } ,
832
+ ) ;
825
833
} catch ( ex ) {
826
834
debugger ;
827
835
params = { error : { message : ex . message } } ;
@@ -864,6 +872,14 @@ export class PatchDetailsWebviewProvider
864
872
if ( summary == null ) throw new Error ( 'Error retrieving content' ) ;
865
873
866
874
params = extractDraftMessage ( summary ) ;
875
+
876
+ this . container . telemetry . sendEvent (
877
+ 'generateDraftMessage' ,
878
+ {
879
+ draftType : 'patch' ,
880
+ } ,
881
+ { source : 'patchDetails' } ,
882
+ ) ;
867
883
} catch ( ex ) {
868
884
debugger ;
869
885
params = { error : { message : ex . message } } ;
Original file line number Diff line number Diff line change @@ -1086,6 +1086,14 @@ export class CommitDetailsWebviewProvider
1086
1086
if ( summary == null ) throw new Error ( 'Error retrieving content' ) ;
1087
1087
1088
1088
params = { summary : summary } ;
1089
+
1090
+ this . container . telemetry . sendEvent (
1091
+ 'explainChanges' ,
1092
+ {
1093
+ changeType : isStash ( this . _context . commit ) ? 'stash' : 'commit' ,
1094
+ } ,
1095
+ { source : 'inspect' } ,
1096
+ ) ;
1089
1097
} catch ( ex ) {
1090
1098
debugger ;
1091
1099
params = { error : { message : ex . message } } ;
@@ -1120,6 +1128,14 @@ export class CommitDetailsWebviewProvider
1120
1128
if ( summary == null ) throw new Error ( 'Error retrieving content' ) ;
1121
1129
1122
1130
params = extractDraftMessage ( summary ) ;
1131
+
1132
+ this . container . telemetry . sendEvent (
1133
+ 'generateDraftMessage' ,
1134
+ {
1135
+ draftType : 'suggested_pr_change' ,
1136
+ } ,
1137
+ { source : 'inspect' } ,
1138
+ ) ;
1123
1139
} catch ( ex ) {
1124
1140
debugger ;
1125
1141
params = { error : { message : ex . message } } ;
You can’t perform that action at this time.
0 commit comments