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 {
249249 CodeWhispererTracker . getTracker ( ) . enqueue ( {
250250 conversationID : this . telemetryHelper . getConversationId ( message . tabID ) ?? '' ,
251251 messageID : message . messageId ,
252+ userIntent : message . userIntent ,
252253 time : new Date ( ) ,
253254 fileUrl : editor . document . uri ,
254255 startPosition : cursorStart ,
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export interface InsertCodeAtCursorPosition {
3939 command : string | undefined
4040 tabID : string
4141 messageId : string
42+ userIntent : UserIntent | undefined
4243 code : string
4344 insertionTargetType : string | undefined
4445 codeReference : CodeReference [ ] | undefined
@@ -51,6 +52,7 @@ export interface CopyCodeToClipboard {
5152 command : string | undefined
5253 tabID : string
5354 messageId : string
55+ userIntent : UserIntent | undefined
5456 code : string
5557 insertionTargetType : string | undefined
5658 codeReference : CodeReference [ ] | undefined
@@ -148,6 +150,7 @@ export interface TriggerPayload {
148150export interface InsertedCode {
149151 readonly conversationID : string
150152 readonly messageID : string
153+ readonly userIntent : UserIntent | undefined
151154 readonly time : Date
152155 readonly fileUrl : vscode . Uri
153156 readonly startPosition : vscode . Position
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ export class CWCTelemetryHelper {
158158 cwsprChatConversationId : conversationId ?? '' ,
159159 credentialStartUrl : AuthUtil . instance . startUrl ,
160160 cwsprChatMessageId : message . messageId ,
161+ cwsprChatUserIntent : this . getUserIntentForTelemetry ( message . userIntent ) ,
161162 cwsprChatInteractionType : 'insertAtCursor' ,
162163 cwsprChatAcceptedCharactersLength : message . code . length ,
163164 cwsprChatAcceptedNumberOfLines : message . code . split ( '\n' ) . length ,
@@ -175,6 +176,7 @@ export class CWCTelemetryHelper {
175176 cwsprChatConversationId : conversationId ?? '' ,
176177 credentialStartUrl : AuthUtil . instance . startUrl ,
177178 cwsprChatMessageId : message . messageId ,
179+ cwsprChatUserIntent : this . getUserIntentForTelemetry ( message . userIntent ) ,
178180 cwsprChatInteractionType : 'copySnippet' ,
179181 cwsprChatAcceptedCharactersLength : message . code . length ,
180182 cwsprChatInteractionTarget : message . insertionTargetType ,
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ export class UIMessageListener {
152152 command : msg . command ,
153153 tabID : msg . tabID ,
154154 messageId : msg . messageId ,
155+ userIntent : msg . userIntent ,
155156 code : msg . code ,
156157 insertionTargetType : msg . insertionTargetType ,
157158 codeReference : msg . codeReference ,
@@ -166,6 +167,7 @@ export class UIMessageListener {
166167 command : msg . command ,
167168 tabID : msg . tabID ,
168169 messageId : msg . messageId ,
170+ userIntent : msg . userIntent ,
169171 code : msg . code ,
170172 insertionTargetType : msg . insertionTargetType ,
171173 codeReference : msg . codeReference ,
Original file line number Diff line number Diff line change 821821 {
822822 "type" : " cwsprChatMessageId"
823823 },
824+ {
825+ "type" : " cwsprChatUserIntent" ,
826+ "required" : false
827+ },
824828 {
825829 "type" : " cwsprChatInteractionType"
826830 },
You can’t perform that action at this time.
0 commit comments