-
Notifications
You must be signed in to change notification settings - Fork 37.3k
edit markdown parts in collapsible part #286301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 adds support for editing markdown parts within collapsible thinking containers in the chat interface. The changes enable markdown content blocks containing codeblock URIs (indicating code edits) to be grouped and displayed inside thinking/working containers alongside tool invocations.
Key changes:
- Added
hasCodeblockUriTagutility function to quickly check for codeblock URI tags in text - Updated thinking container logic to include markdown content with edits alongside tool invocations
- Changed UI labels from "Thinking..." to "Working..." for better clarity
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/widget/annotations.ts | Added new exported function hasCodeblockUriTag for detecting codeblock URI tags |
| src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts | Extended thinking container logic to handle markdown content with codeblock URIs; updated part pinning logic to include markdown edits |
| src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css | Added styling for markdown parts displayed within thinking containers |
| src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.ts | Updated thinking part to handle markdown content items; renamed variables from tool-specific to generic item terminology; changed labels from "Thinking" to "Working" |
Comments suppressed due to low confidence (2)
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css:130
- Extra blank line: There are two consecutive blank lines (129-130) which is inconsistent with the rest of the file's formatting. Only one blank line should separate CSS rules.
}
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts:1352
- Complex condition with poor readability: This condition on line 1352 is extremely long and difficult to read. Consider extracting this logic into a well-named helper method like 'isThinkingRelatedPart' or breaking it into multiple lines with intermediate boolean variables to improve maintainability and readability.
const followsThinkingPart = previousContent?.kind === 'thinking' || previousContent?.kind === 'toolInvocation' || previousContent?.kind === 'prepareToolInvocation' || previousContent?.kind === 'toolInvocationSerialized' || previousContent?.kind === 'textEditGroup' || (previousContent?.kind === 'markdownContent' && this.hasCodeblockUri(previousContent));
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts
Outdated
Show resolved
Hide resolved
| export function hasCodeblockUriTag(text: string): boolean { | ||
| return text.includes('<vscode_codeblock_uri'); | ||
| } |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing test coverage: The newly added hasCodeblockUriTag function lacks test coverage. The annotations.test.ts file exists and has tests for other functions in the same module (extractVulnerabilitiesFromText), but hasCodeblockUriTag is not tested. Consider adding tests to verify its behavior with various inputs, including text with and without the vscode_codeblock_uri tag.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
ref #273444