Skip to content

Commit fe9b8ef

Browse files
committed
Add accetpedCharCount into UserTriggerDecision STE
1 parent 4eb0b30 commit fe9b8ef

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/credentials/CodeWhispererClientAdaptor.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ interface CodeWhispererClientAdaptor : Disposable {
9696
suggestionReferenceCount: Int,
9797
lineCount: Int,
9898
numberOfRecommendations: Int,
99+
acceptedCharCount: Int,
99100
): SendTelemetryEventResponse
100101

101102
fun sendUserTriggerDecisionTelemetry(
@@ -107,6 +108,7 @@ interface CodeWhispererClientAdaptor : Disposable {
107108
suggestionReferenceCount: Int,
108109
lineCount: Int,
109110
numberOfRecommendations: Int,
111+
acceptedCharCount: Int,
110112
): SendTelemetryEventResponse
111113

112114
fun sendCodePercentageTelemetry(
@@ -291,6 +293,7 @@ open class CodeWhispererClientAdaptorImpl(override val project: Project) : CodeW
291293
suggestionReferenceCount: Int,
292294
lineCount: Int,
293295
numberOfRecommendations: Int,
296+
acceptedCharCount: Int
294297
): SendTelemetryEventResponse {
295298
val fileContext = requestContext.fileContextInfo
296299
val programmingLanguage = fileContext.programmingLanguage
@@ -322,6 +325,7 @@ open class CodeWhispererClientAdaptorImpl(override val project: Project) : CodeW
322325
it.generatedLine(lineCount)
323326
it.customizationArn(requestContext.customizationArn)
324327
it.numberOfRecommendations(numberOfRecommendations)
328+
it.acceptedCharacterCount(acceptedCharCount)
325329
}
326330
}
327331
requestBuilder.optOutPreference(getTelemetryOptOutPreference())
@@ -338,6 +342,7 @@ open class CodeWhispererClientAdaptorImpl(override val project: Project) : CodeW
338342
suggestionReferenceCount: Int,
339343
lineCount: Int,
340344
numberOfRecommendations: Int,
345+
acceptedCharCount: Int,
341346
): SendTelemetryEventResponse {
342347
val fileContext = requestContext.fileContextInfo
343348
val programmingLanguage = fileContext.programmingLanguage
@@ -365,6 +370,7 @@ open class CodeWhispererClientAdaptorImpl(override val project: Project) : CodeW
365370
it.generatedLine(lineCount)
366371
it.customizationArn(requestContext.customizationArn)
367372
it.numberOfRecommendations(numberOfRecommendations)
373+
it.acceptedCharacterCount(acceptedCharCount)
368374
}
369375
}
370376
requestBuilder.optOutPreference(getTelemetryOptOutPreference())

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ class CodeWhispererTelemetryService {
228228
suggestionState,
229229
suggestionReferenceCount,
230230
generatedLineCount,
231-
recommendationContext.details.size
231+
recommendationContext.details.size,
232+
acceptedCharCount
232233
)
233234
LOG.debug {
234235
"Successfully sent user trigger decision telemetry. RequestId: ${response.responseMetadata().requestId()}"

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/telemetry/CodeWhispererTelemetryServiceNew.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ class CodeWhispererTelemetryServiceNew {
230230
suggestionState,
231231
suggestionReferenceCount,
232232
generatedLineCount,
233-
recommendationContext.details.size
233+
recommendationContext.details.size,
234+
acceptedCharCount
234235
)
235236
LOG.debug {
236237
"Successfully sent user trigger decision telemetry. RequestId: ${response.responseMetadata().requestId()}"

0 commit comments

Comments
 (0)