Skip to content

Refactor logging level from Debug to Info for state model changes#319228

Merged
DonJayamanne merged 1 commit into
mainfrom
don/married-toucan
Jun 1, 2026
Merged

Refactor logging level from Debug to Info for state model changes#319228
DonJayamanne merged 1 commit into
mainfrom
don/married-toucan

Conversation

@DonJayamanne
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 31, 2026 23:27
@DonJayamanne DonJayamanne self-assigned this May 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Despite the title, this PR makes two distinct kinds of changes: (1) it raises the log level of chat-input state-model change diagnostics in chatModel.ts from debug to info, and (2) it refactors the resetCurrentLanguageModelIfUnavailable closure in chatInputPart.ts, collapsing the CopilotCLI-specific branch into the general path and always emitting the diagnostic when the log level is Debug.

Changes:

  • Change _logChangesToStateModel / logChangesToStateModel to gate on and emit at LogLevel.Info instead of LogLevel.Debug (includes stack traces).
  • Unify the SessionType.CopilotCLI and non-CLI branches in resetCurrentLanguageModelIfUnavailable, dropping the !models.some(m => m.metadata.id === modelIdentifier) extra guard previously applied only to CopilotCLI.
  • Expand the debug diagnostic payload (adds currentModeKind, shouldResetOnModelListChange, vendors, hiddenModelIds).
Show a summary per file
File Description
src/vs/workbench/contrib/chat/common/model/chatModel.ts Promotes the chat input state-model change logging from debug to info in both helper functions.
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts Refactors the model-reset closure: removes the CopilotCLI-specific reset guard, always emits the diagnostic at Debug level, and extends the diagnostic payload.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 3

Comment thread src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts
Comment thread src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts
Comment thread src/vs/workbench/contrib/chat/common/model/chatModel.ts
@DonJayamanne DonJayamanne marked this pull request as ready for review May 31, 2026 23:33
@DonJayamanne DonJayamanne enabled auto-merge (squash) May 31, 2026 23:44
@DonJayamanne DonJayamanne merged commit 2a20445 into main Jun 1, 2026
25 of 26 checks passed
@DonJayamanne DonJayamanne deleted the don/married-toucan branch June 1, 2026 00:04
@vs-code-engineering vs-code-engineering Bot added this to the 1.123.0 milestone Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants