Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://ld246.com/article/1695087852446

Vanessa7f9e7950353a
diff --git a/app/src/dialog/tooltip.ts b/app/src/dialog/tooltip.ts
index ef6ccf27db..6d84c774d7 100644
--- a/app/src/dialog/tooltip.ts
+++ b/app/src/dialog/tooltip.ts
@@ -47,7 +47,11 @@ export const showTooltip = (message: string, target: Element, error = false) =>
messageElement.style.top = top + "px";
}
if (left + messageElement.clientWidth > window.innerWidth) {
- messageElement.style.left = (window.innerWidth - messageElement.clientWidth) + "px";
+ if (position === "parentE") {
+ messageElement.style.left = (parentRect.left - 8 - messageElement.clientWidth) + "px";
+ } else {
+ messageElement.style.left = (window.innerWidth - messageElement.clientWidth) + "px";
+ }
} else {
messageElement.style.left = Math.max(0, left) + "px";
}