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 authored and GitHub committed 2026-10-23 04:16:15 +09:00
1 parent b1e10f5306
commit 3299a09753
8 files changed
+8 -1

No files matched your search

@@ -1084,6 +1084,7 @@
? `${model?.ollama?.digest} **(${model?.ollama?.modified_at})**`
: model.id
)}
allowHTML={true}
className="min-w-0 flex-1"
placement="top-start"
>
@@ -78,6 +78,7 @@
sanitizeResponseContent(selectedModelDescription).replaceAll('\n', '<br>')
)
)}
allowHTML={true}
placement="right"
>
<img
@@ -108,6 +108,7 @@
{#each filteredItems as skill, skillIdx}
<Tooltip
content={getTooltipContent(skill)}
allowHTML={true}
placement="top-start"
tippyOptions={{ maxWidth: '20rem' }}
>
@@ -522,6 +522,7 @@
{@const itemIdx = commandItems.length + filteredPrompts.length + skillIdx}
<Tooltip
content={getSkillTooltipContent(skill)}
allowHTML={true}
placement="top-start"
tippyOptions={{ maxWidth: '20rem' }}
>
@@ -1200,6 +1200,7 @@
<span id="usage-{message.id}" hidden>{usage}</span>
<Tooltip
content={`<pre>${sanitizeResponseContent(usage)}</pre>`}
allowHTML={true}
placement="bottom"
>
<button
@@ -263,6 +263,7 @@
content={`${marked.parse(
sanitizeResponseContent(localizedDescription).replaceAll('\n', '<br>')
)}`}
allowHTML={true}
>
<div class=" translate-y-[1px]">
<svg
@@ -214,6 +214,7 @@
sanitizeResponseContent(selectedModelDescription).replaceAll('\n', '<br>')
)
)}
allowHTML={true}
placement="top"
>
<div
+1 -1
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;