Skip to content

Commit d2357db

Browse files
atonaamztomcat323
authored andcommitted
feat: emit telemetry via user decision for NEP (aws#7376)
--- - 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 8d8d6c5 commit d2357db

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

packages/amazonq/src/app/inline/EditRendering/displayImage.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,21 @@ export async function displaySvgDecoration(
323323
}
324324
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
325325
decorationManager.dispose()
326+
const params: LogInlineCompletionSessionResultsParams = {
327+
sessionId: session.sessionId,
328+
completionSessionResult: {
329+
[item.itemId]: {
330+
seen: true,
331+
accepted: true,
332+
discarded: false,
333+
},
334+
},
335+
totalSessionDisplayTime: Date.now() - session.requestStartTime,
336+
firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
337+
addedCharacterCount: addedCharacterCount,
338+
deletedCharacterCount: deletedCharacterCount,
339+
}
340+
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
326341
},
327342
() => {
328343
// Handle reject
@@ -341,6 +356,19 @@ export async function displaySvgDecoration(
341356
}
342357
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
343358
decorationManager.dispose()
359+
const params: LogInlineCompletionSessionResultsParams = {
360+
sessionId: session.sessionId,
361+
completionSessionResult: {
362+
[item.itemId]: {
363+
seen: true,
364+
accepted: false,
365+
discarded: false,
366+
},
367+
},
368+
addedCharacterCount: addedCharacterCount,
369+
deletedCharacterCount: deletedCharacterCount,
370+
}
371+
languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
344372
},
345373
originalCode,
346374
newCode,

0 commit comments

Comments
 (0)