From f6c7c26e3726cf8bfa96c4c0cc463628c25e177c Mon Sep 17 00:00:00 2001 From: Jan Hartman Date: Thu, 23 Jan 2025 17:58:20 +0100 Subject: [PATCH] Fix intent telemetry: use correct field names and avoid operator precedence issue --- vscode/src/chat/chat-view/ChatController.ts | 2 +- vscode/webviews/chat/Transcript.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vscode/src/chat/chat-view/ChatController.ts b/vscode/src/chat/chat-view/ChatController.ts index 99a2c094afd4..a2faad557822 100644 --- a/vscode/src/chat/chat-view/ChatController.ts +++ b/vscode/src/chat/chat-view/ChatController.ts @@ -832,7 +832,7 @@ export class ChatController implements vscode.Disposable, vscode.WebviewViewProv const omniBoxEnabled = await this.isOmniBoxEnabled() recorder.setIntentInfo({ - userSpecifiedIntent: manuallySelectedIntent ?? omniBoxEnabled ? 'auto' : 'chat', + userSpecifiedIntent: manuallySelectedIntent ?? (omniBoxEnabled ? 'auto' : 'chat'), detectedIntent: detectedIntent, detectedIntentScores: detectedIntentScores, }) diff --git a/vscode/webviews/chat/Transcript.tsx b/vscode/webviews/chat/Transcript.tsx index 84ca2e966281..56c29f52a088 100644 --- a/vscode/webviews/chat/Transcript.tsx +++ b/vscode/webviews/chat/Transcript.tsx @@ -350,8 +350,8 @@ const TranscriptInteraction: FC = memo(props => { const commonProps = { editorValue, - intent, - intentScores, + preDetectedIntent: intent, + preDetectedIntentScores: intentScores, manuallySelectedIntent: intentFromSubmit || manuallySelectedIntent.intent ||