Skip to content

remove specific model checks we don't need#275636

Merged
justschen merged 1 commit intomicrosoft:mainfrom
justschen:justin/bastiodon
Nov 5, 2025
Merged

remove specific model checks we don't need#275636
justschen merged 1 commit intomicrosoft:mainfrom
justschen:justin/bastiodon

Conversation

@justschen
Copy link
Copy Markdown
Collaborator

added in as a defensive thing but we don't really need and shouldn't do this

Copilot AI review requested due to automatic review settings November 5, 2025 17:54
@justschen justschen enabled auto-merge (squash) November 5, 2025 17:57
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

This pull request removes model-specific logic for handling bolded content in chat thinking parts. The change makes the bold stripping behavior universal rather than conditional on the model being "codex".

Key Changes

  • Removed unused import isResponseVM from chatViewModel
  • Removed the modelId private field and its initialization logic
  • Made bold marker stripping (**...**) apply to all models instead of only "codex" models

Comment on lines +168 to +169
if (cleanedContent.startsWith('**') && cleanedContent.endsWith('**')) {
contentToRender = cleanedContent.slice(2, -2);
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

The bold stripping logic is too simplistic and may incorrectly strip valid markdown bold markers. If the content is 'Bold text more', this would incorrectly strip the outer markers leaving 'Bold** text **more' which is malformed markdown. Consider checking that the content doesn't contain any other bold markers between the start and end, or use a more robust regex-based approach to detect if the entire content is a single bold block.

Suggested change
if (cleanedContent.startsWith('**') && cleanedContent.endsWith('**')) {
contentToRender = cleanedContent.slice(2, -2);
const boldBlockMatch = cleanedContent.match(/^\*\*(.+)\*\*$/s);
if (boldBlockMatch) {
contentToRender = boldBlockMatch[1];

Copilot uses AI. Check for mistakes.
@justschen justschen merged commit e04fb43 into microsoft:main Nov 5, 2025
22 of 23 checks passed
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants