An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/12899
Vanessaa3ff9442163f
diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.tsindex 7dc1389d3f..fa7928a04e 100644--- a/app/src/protyle/breadcrumb/index.ts+++ b/app/src/protyle/breadcrumb/index.ts@@ -8,7 +8,7 @@ import {setEditMode} from "../util/setEditMode";import {RecordMedia} from "../util/RecordMedia";import {hideMessage, showMessage} from "../../dialog/message";import {uploadFiles} from "../upload";-import {hasClosestBlock, hasClosestByAttribute} from "../util/hasClosest";+import {hasClosestBlock, hasClosestByAttribute, hasTopClosestByClassName} from "../util/hasClosest";import {needSubscribe} from "../../util/needSubscribe";import {isMobile} from "../../util/functions";import {zoomOut} from "../../menus/protyle";@@ -582,6 +582,8 @@ ${padHTML}/// #elsewindow.siyuan.menus.menu.popup(position);/// #endif+ const popoverElement = hasTopClosestByClassName(protyle.element, "block__popover", true);+ window.siyuan.menus.menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app");});}diff --git a/app/src/protyle/header/openTitleMenu.ts b/app/src/protyle/header/openTitleMenu.tsindex ca5c0a21f1..18acb346a5 100644--- a/app/src/protyle/header/openTitleMenu.ts+++ b/app/src/protyle/header/openTitleMenu.ts@@ -23,6 +23,7 @@ import {genImportMenu} from "../../menus/navigation";import {transferBlockRef} from "../../menus/block";import {addEditorToDatabase} from "../render/av/addToDatabase";import {openFileById} from "../../editor/util";+import {hasTopClosestByClassName} from "../util/hasClosest";export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {hideTooltip();@@ -287,5 +288,7 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {/// #elsewindow.siyuan.menus.menu.popup(position);/// #endif+ const popoverElement = hasTopClosestByClassName(protyle.element, "block__popover", true);+ window.siyuan.menus.menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app");});};