Skip to content

Commit c5a41d8

Browse files
authored
Merge branch 'aws:feature/agentic-chat' into feature/agentic-chat
2 parents a2e1476 + 168a865 commit c5a41d8

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

packages/core/src/amazonq/webview/ui/tabs/generator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ Enter \`/\` to view quick actions. Use \`@\` to add saved prompts, files, folder
115115
{
116116
type: 'switch',
117117
id: 'pair-programmer-mode',
118-
tooltip: 'Enable or disable Pair Programmer',
118+
tooltip: 'Turn off for read only responses',
119+
alternateTooltip: 'Turn on to allow Q to run commands and generate code diffs',
119120
value: 'true',
120121
icon: 'code-block',
121122
},

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

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -218,27 +218,39 @@ export class CWCTelemetryHelper {
218218
}
219219

220220
public recordToolUseSuggested(toolUse: ToolUse, messageId: string) {
221-
telemetry.amazonq_toolUseSuggested.emit({
222-
result: 'Succeeded',
223-
cwsprChatConversationId: messageId,
224-
cwsprChatConversationType: 'AgenticChatWithToolUse',
225-
credentialStartUrl: AuthUtil.instance.startUrl,
226-
cwsprToolName: toolUse.name ?? '',
227-
cwsprToolUseId: toolUse.toolUseId ?? '',
228-
})
221+
try {
222+
telemetry.amazonq_toolUseSuggested.run((span) => {
223+
span.record({
224+
result: 'Succeeded',
225+
cwsprChatConversationId: messageId,
226+
cwsprChatConversationType: 'AgenticChatWithToolUse',
227+
credentialStartUrl: AuthUtil.instance.startUrl,
228+
cwsprToolName: toolUse.name ?? '',
229+
cwsprToolUseId: toolUse.toolUseId ?? '',
230+
})
231+
})
232+
} catch (e: any) {
233+
getLogger().error('Unable to record amazonq_toolUseSuggested telemetry')
234+
}
229235
}
230236

231237
public recordInteractionWithAgenticChat(
232238
interactionType: AgenticChatInteractionType,
233239
message: AcceptResponseMessage | CustomFormActionMessage | StopResponseMessage
234240
) {
235-
telemetry.amazonq_interactWithAgenticChat.emit({
236-
cwsprAgenticChatInteractionType: interactionType,
237-
result: 'Succeeded',
238-
cwsprChatConversationId: this.getConversationId(message.tabID ?? '') ?? '',
239-
cwsprChatConversationType: 'AgenticChat',
240-
credentialStartUrl: AuthUtil.instance.startUrl,
241-
})
241+
try {
242+
telemetry.amazonq_interactWithAgenticChat.run((span) => {
243+
span.record({
244+
cwsprAgenticChatInteractionType: interactionType,
245+
result: 'Succeeded',
246+
cwsprChatConversationId: this.getConversationId(message.tabID ?? '') ?? '',
247+
cwsprChatConversationType: 'AgenticChat',
248+
credentialStartUrl: AuthUtil.instance.startUrl,
249+
})
250+
})
251+
} catch (e: any) {
252+
getLogger().error('Unable to record amazonq_interactWithAgenticChat telemetry')
253+
}
242254
}
243255

244256
public recordInteractWithMessage(

0 commit comments

Comments
 (0)