Skip to content

Fix: render codicons in tooltip header and footer - #2

Open
Shivam8584 wants to merge 1 commit into
Brainmetrix:mainfrom
Shivam8584:fix/tooltip-codicon-rendering
Open

Shivam8584 wants to merge 1 commit into
Brainmetrix:mainfrom
Shivam8584:fix/tooltip-codicon-rendering

Conversation

@Shivam8584

Copy link
Copy Markdown

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 a MarkdownString only renders when supportThemeIcons is set to true. The flag is not currently enabled on the tooltip's MarkdownString instance, so the icon tokens are rendered as literal text.

Fix

One-line change in buildTooltip() — set md.supportThemeIcons = true; alongside the existing md.isTrusted = true;.

Before / After

Before: Tooltip header reads ## $(sparkle) Claude Statusline literally; 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

  • Built locally and reloaded VSCodium — tooltip header and footer icons render correctly.
  • Verified status bar text (which already worked) is unaffected.

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.
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.

1 participant