Skip to content

Add chatSessionId to chat.modelChange telemetry#322579

Merged
aashna merged 3 commits into
microsoft:mainfrom
Sid200026:chat-modelchange-conversation-id
Jun 26, 2026
Merged

Add chatSessionId to chat.modelChange telemetry#322579
aashna merged 3 commits into
microsoft:mainfrom
Sid200026:chat-modelchange-conversation-id

Conversation

@Sid200026

Copy link
Copy Markdown
Member

Correlate explicit model-picker switches with the conversation by emitting the chat session id

Copilot AI review requested due to automatic review settings June 23, 2026 16:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a chat-session correlation identifier to the chat.modelChange telemetry event so model-picker switches can be associated with the active chat conversation/session.

Changes:

  • Extend the model picker delegate API with an optional getConversationId() hook.
  • Emit conversationId on the chat.modelChange telemetry event when the user selects a different model.
  • Wire the chat input’s delegate implementation to derive the ID from the current session resource.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.ts Adds optional delegate method for providing the current conversation/session correlation id.
src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts Extends chat.modelChange telemetry schema and logs the conversation id on model selection.
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts Implements the delegate hook by converting the current session resource to an id.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 1
Comment thread src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.ts Outdated
@Sid200026 Sid200026 force-pushed the chat-modelchange-conversation-id branch from 1cb0b44 to 854f47f Compare June 23, 2026 17:29
@Sid200026 Sid200026 changed the title Add conversationId to chat.modelChange telemetry Jun 23, 2026
bhavyaus
bhavyaus previously approved these changes Jun 23, 2026

@bhavyaus bhavyaus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

benibenj
benibenj previously approved these changes Jun 23, 2026
…ersation-id

# Conflicts:
#	src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts
auto-merge was automatically disabled June 25, 2026 17:20

Head branch was pushed to by a user without write access

@Sid200026 Sid200026 dismissed stale reviews from benibenj and bhavyaus via 73d1bcc June 25, 2026 17:20
@aashna aashna merged commit 4ef33b8 into microsoft:main Jun 26, 2026
46 of 47 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.127.0 milestone Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

8 participants