Fix: render codicons in tooltip header and footer - #2
Open
Shivam8584 wants to merge 1 commit into
Open
Shivam8584 wants to merge 1 commit into
Shivam8584 wants to merge 1 commit into
Conversation
The hover tooltip showed raw $(sparkle), $(refresh), and $(gear) strings instead of rendered icons because MarkdownString.supportThemeIcons was not enabled. Per the VS Code API, $(icon) syntax in MarkdownString only renders when this flag is true.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The hover tooltip currently shows raw
$(sparkle),$(refresh), and$(gear)strings instead of rendered codicons.Cause
Per the VS Code API,
$(icon-name)syntax inside aMarkdownStringonly renders whensupportThemeIconsis set totrue. The flag is not currently enabled on the tooltip'sMarkdownStringinstance, so the icon tokens are rendered as literal text.Fix
One-line change in
buildTooltip()— setmd.supportThemeIcons = true;alongside the existingmd.isTrusted = true;.Before / After
Before: Tooltip header reads
## $(sparkle) Claude Statuslineliterally; footer shows[$(refresh) Refresh]and[$(gear) Settings]as plain text.After: Sparkle icon renders correctly in the header; refresh/gear icons render in the footer command links.
Test plan