This PR Fixes Issue #243134 : Chat Item Display Issue in VS Code Copilot When HTML Tags Start the Input #243135
+2
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR Fixes Issue #243134 : Chat Item Display Issue in VS Code Copilot When HTML Tags Start the Input
Overview
In the
src\vs\workbench\contrib\chat\browser\media\chat.css
file, the original styles for.interactive-item-container .value .rendered-markdown
and its childp
elements caused layout issues when messages started with HTML tags. Specifically, the lack of a bottom margin on the.rendered-markdown
class and excessive margins on thep
elements inside it contributed to the text overlapping with thechat-attached-context
element.Original CSS:
Changes
To address this issue, I have made adjustments to the CSS rules for
.interactive-item-container .value .rendered-markdown
and its childp
elements. The primary change involves adding a bottom margin to.rendered-markdown
to ensure proper spacing below the content, and removing the bottom margin from thep
elements within it to avoid excessive space.Modified CSS:
Testing
I tested these changes by reproducing the original issue using various inputs starting with HTML tags in the VS Code Copilot's chat interface. After applying the modifications, the text no longer overlaps with the
chat-attached-context
element, and all parts of the user's message are clearly visible.