🐛 tooltip hovering

This commit is contained in:
2026-03-17 11:01:59 +10:00
parent 6567f1977a
commit 416c6c0d5c
3 changed files with 27 additions and 3 deletions

View File

@@ -209,7 +209,8 @@ const annotationHoverTooltip = hoverTooltip(
// User comments: show static tooltip with the comment text — no AI streaming
if (ann.type === 'user_comment') {
return {
pos,
pos: ann.from,
end: ann.to,
above: true,
create() {
const dom = document.createElement('div')
@@ -234,13 +235,17 @@ const annotationHoverTooltip = hoverTooltip(
body.className = 'annotation-tooltip-body'
body.textContent = ann.comment ?? ann.message
dom.appendChild(body)
const bridge = document.createElement('div')
bridge.className = 'cm-tooltip-arrow'
dom.appendChild(bridge)
return { dom, destroy() {} }
}
}
}
return {
pos,
pos: ann.from,
end: ann.to,
above: true,
create() {
const dom = document.createElement('div')
@@ -302,6 +307,10 @@ const annotationHoverTooltip = hoverTooltip(
}
})
const bridge = document.createElement('div')
bridge.className = 'cm-tooltip-arrow'
dom.appendChild(bridge)
return { dom, destroy() { cancelAnalysis() } }
}
}