fix: tooltips show names and descriptions exactly as written (#32953)

Text shown in a tooltip was treated as markup, so a name, path or description containing angle brackets came out mangled or partly missing. Tooltips now show their text as written, and the few places that deliberately show formatted content ask for it explicitly.
This commit is contained in:
Classic298 2026-10-22 21:16:15 +02:00 • committed by GitHub
parent b1e10f5306
commit 3299a09753
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 8 additions and 1 deletions

View file

@ -1084,6 +1084,7 @@
? `${model?.ollama?.digest} **(${model?.ollama?.modified_at})**`
: model.id
)}
allowHTML={true}
className="min-w-0 flex-1"
placement="top-start"
>

View file

@ -78,6 +78,7 @@
sanitizeResponseContent(selectedModelDescription).replaceAll('\n', '<br>')
)
)}
allowHTML={true}
placement="right"
>
<img

View file

@ -108,6 +108,7 @@
{#each filteredItems as skill, skillIdx}
<Tooltip
content={getTooltipContent(skill)}
allowHTML={true}
placement="top-start"
tippyOptions={{ maxWidth: '20rem' }}
>

View file

@ -522,6 +522,7 @@
{@const itemIdx = commandItems.length + filteredPrompts.length + skillIdx}
<Tooltip
content={getSkillTooltipContent(skill)}
allowHTML={true}
placement="top-start"
tippyOptions={{ maxWidth: '20rem' }}
>

View file

@ -1200,6 +1200,7 @@
<span id="usage-{message.id}" hidden>{usage}</span>
<Tooltip
content={`<pre>${sanitizeResponseContent(usage)}</pre>`}
allowHTML={true}
placement="bottom"
>
<button

View file

@ -263,6 +263,7 @@
content={`${marked.parse(
sanitizeResponseContent(localizedDescription).replaceAll('\n', '<br>')
)}`}
allowHTML={true}
>
<div class=" translate-y-[1px]">
<svg

View file

@ -214,6 +214,7 @@
sanitizeResponseContent(selectedModelDescription).replaceAll('\n', '<br>')
)
)}
allowHTML={true}
placement="top"
>
<div

View file

@ -19,7 +19,7 @@
export let touch = true;
export let theme = '';
export let offset: TippyProps['offset'] = [0, 4];
export let allowHTML = true;
export let allowHTML = false;
export let tippyOptions: Partial<TippyProps> = {};
export let interactive = false;