Skip to content

Commit 00ffeb3

Browse files
authored
telemetry: flush usertriggerDecision event on keystroke or manual trigger (aws#8085)
… ## Problem previously UTD will be delayed until next service call, which means it doesn't gurantee service team will collect all the datapoints ## Solution --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 1f62501 commit 00ffeb3

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/core/src/codewhisperer/commands/invokeRecommendation.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export async function invokeRecommendation(
2020
client: DefaultCodeWhispererClient,
2121
config: ConfigurationEntry
2222
) {
23+
// Call report user decisions once to report recommendations leftover from last invocation.
24+
RecommendationHandler.instance.reportUserDecisions(-1)
25+
2326
if (!editor || !config.isManualTriggerEnabled) {
2427
return
2528
}

packages/core/src/codewhisperer/service/inlineCompletionService.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ export class InlineCompletionService {
8888
}
8989
}
9090

91-
// Call report user decisions once to report recommendations leftover from last invocation.
92-
RecommendationHandler.instance.reportUserDecisions(-1)
9391
TelemetryHelper.instance.setInvokeSuggestionStartTime()
9492
ClassifierTrigger.instance.recordClassifierResultForAutoTrigger(editor, autoTriggerType, event)
9593

packages/core/src/codewhisperer/service/keyStrokeHandler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ export class KeyStrokeHandler {
8787
client: DefaultCodeWhispererClient,
8888
config: ConfigurationEntry
8989
): Promise<void> {
90+
// Call report user decisions once to report recommendations leftover from last invocation.
91+
RecommendationHandler.instance.reportUserDecisions(-1)
92+
9093
try {
9194
if (!config.isAutomatedTriggerEnabled) {
9295
return

0 commit comments

Comments
 (0)