File tree Expand file tree Collapse file tree 5 files changed +12
-0
lines changed Expand file tree Collapse file tree 5 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ export class ChatController {
249
249
CodeWhispererTracker . getTracker ( ) . enqueue ( {
250
250
conversationID : this . telemetryHelper . getConversationId ( message . tabID ) ?? '' ,
251
251
messageID : message . messageId ,
252
+ userIntent : message . userIntent ,
252
253
time : new Date ( ) ,
253
254
fileUrl : editor . document . uri ,
254
255
startPosition : cursorStart ,
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export interface InsertCodeAtCursorPosition {
39
39
command : string | undefined
40
40
tabID : string
41
41
messageId : string
42
+ userIntent : UserIntent | undefined
42
43
code : string
43
44
insertionTargetType : string | undefined
44
45
codeReference : CodeReference [ ] | undefined
@@ -51,6 +52,7 @@ export interface CopyCodeToClipboard {
51
52
command : string | undefined
52
53
tabID : string
53
54
messageId : string
55
+ userIntent : UserIntent | undefined
54
56
code : string
55
57
insertionTargetType : string | undefined
56
58
codeReference : CodeReference [ ] | undefined
@@ -148,6 +150,7 @@ export interface TriggerPayload {
148
150
export interface InsertedCode {
149
151
readonly conversationID : string
150
152
readonly messageID : string
153
+ readonly userIntent : UserIntent | undefined
151
154
readonly time : Date
152
155
readonly fileUrl : vscode . Uri
153
156
readonly startPosition : vscode . Position
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ export class CWCTelemetryHelper {
158
158
cwsprChatConversationId : conversationId ?? '' ,
159
159
credentialStartUrl : AuthUtil . instance . startUrl ,
160
160
cwsprChatMessageId : message . messageId ,
161
+ cwsprChatUserIntent : this . getUserIntentForTelemetry ( message . userIntent ) ,
161
162
cwsprChatInteractionType : 'insertAtCursor' ,
162
163
cwsprChatAcceptedCharactersLength : message . code . length ,
163
164
cwsprChatAcceptedNumberOfLines : message . code . split ( '\n' ) . length ,
@@ -175,6 +176,7 @@ export class CWCTelemetryHelper {
175
176
cwsprChatConversationId : conversationId ?? '' ,
176
177
credentialStartUrl : AuthUtil . instance . startUrl ,
177
178
cwsprChatMessageId : message . messageId ,
179
+ cwsprChatUserIntent : this . getUserIntentForTelemetry ( message . userIntent ) ,
178
180
cwsprChatInteractionType : 'copySnippet' ,
179
181
cwsprChatAcceptedCharactersLength : message . code . length ,
180
182
cwsprChatInteractionTarget : message . insertionTargetType ,
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ export class UIMessageListener {
152
152
command : msg . command ,
153
153
tabID : msg . tabID ,
154
154
messageId : msg . messageId ,
155
+ userIntent : msg . userIntent ,
155
156
code : msg . code ,
156
157
insertionTargetType : msg . insertionTargetType ,
157
158
codeReference : msg . codeReference ,
@@ -166,6 +167,7 @@ export class UIMessageListener {
166
167
command : msg . command ,
167
168
tabID : msg . tabID ,
168
169
messageId : msg . messageId ,
170
+ userIntent : msg . userIntent ,
169
171
code : msg . code ,
170
172
insertionTargetType : msg . insertionTargetType ,
171
173
codeReference : msg . codeReference ,
Original file line number Diff line number Diff line change 821
821
{
822
822
"type" : " cwsprChatMessageId"
823
823
},
824
+ {
825
+ "type" : " cwsprChatUserIntent" ,
826
+ "required" : false
827
+ },
824
828
{
825
829
"type" : " cwsprChatInteractionType"
826
830
},
You can’t perform that action at this time.
0 commit comments