Skip to content

Commit e58d264

Browse files
committed
codewhisperer: update reference count to only count accepted reference
1 parent cb07bb2 commit e58d264

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codewhisperer/util/telemetryHelper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,11 @@ export class TelemetryHelper {
466466

467467
private getAggregatedSuggestionReferenceCount(
468468
events: CodewhispererUserDecision[]
469-
// if there is any recommendation reference within the session, mark the reference number
469+
// if there is reference for accepted recommendation within the session, mark the reference number
470470
// as 1, otherwise mark the session as 0
471471
) {
472472
for (const event of events) {
473-
if (event.codewhispererSuggestionReferenceCount != 0) {
473+
if (event.codewhispererSuggestionState === 'Accept' && event.codewhispererSuggestionReferenceCount !== 0) {
474474
return 1
475475
}
476476
}

0 commit comments

Comments
 (0)