Skip to content

Commit 8cca827

Browse files
authored
telemetry(chat): see if message is apart of agentic loop (aws#7069)
## Problem - want to differentiate between a message without tool use (ex: what time is it) and a message with tool use (ex: write a docstring for my function) ## Solution - for both successful messages and messages that resulted in error, see if this message was apart of an agentic loop. - An agentic loop is when the LLM asks to run a tool and the LLM receives the results back of running the tool. --- - 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 5825d42 commit 8cca827

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/"
4242
},
4343
"devDependencies": {
44-
"@aws-toolkits/telemetry": "^1.0.314",
44+
"@aws-toolkits/telemetry": "^1.0.315",
4545
"@playwright/browser-chromium": "^1.43.1",
4646
"@stylistic/eslint-plugin": "^2.11.0",
4747
"@types/he": "^1.2.3",

packages/core/src/codewhispererChat/controllers/chat/telemetryHelper.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,11 @@ export class CWCTelemetryHelper {
543543
cwsprChatFullDisplayLatency: fullDisplayLatency,
544544
cwsprChatRequestLength: triggerPayload.message.length,
545545
cwsprChatResponseLength: message.messageLength,
546-
cwsprChatConversationType: triggerPayload.origin ? 'AgenticChat' : 'Chat',
546+
cwsprChatConversationType: triggerPayload.origin
547+
? triggerPayload.toolResults
548+
? 'AgenticChatWithToolUse'
549+
: 'AgenticChat'
550+
: 'Chat',
547551
credentialStartUrl: AuthUtil.instance.startUrl,
548552
codewhispererCustomizationArn: triggerPayload.customization.arn,
549553
cwsprChatHasProjectContext: hasProjectLevelContext,
@@ -623,7 +627,11 @@ export class CWCTelemetryHelper {
623627
cwsprChatActiveEditorImportCount: triggerPayload.codeQuery?.fullyQualifiedNames?.used?.length,
624628
cwsprChatResponseCode: responseCode,
625629
cwsprChatRequestLength: triggerPayload.message?.length ?? 0,
626-
cwsprChatConversationType: triggerPayload.origin ? 'AgenticChat' : 'Chat',
630+
cwsprChatConversationType: triggerPayload.origin
631+
? triggerPayload.toolResults
632+
? 'AgenticChatWithToolUse'
633+
: 'AgenticChat'
634+
: 'Chat',
627635
credentialStartUrl: AuthUtil.instance.startUrl,
628636
requestId: requestID,
629637
reasonDesc: getTelemetryReasonDesc(errorReason),

0 commit comments

Comments
 (0)