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: fix https://github.com/siyuan-note/siyuan/issues/9674
Vanessa12c9151ab3c9
diff --git a/app/src/boot/globalEvent/event.ts b/app/src/boot/globalEvent/event.tsindex 3a95439322..b70300a05e 100644--- a/app/src/boot/globalEvent/event.ts+++ b/app/src/boot/globalEvent/event.ts@@ -13,6 +13,8 @@ import {initTabMenu} from "../../menus/tab";import {getInstanceById} from "../../layout/util";import {Tab} from "../../layout/Tab";import {hideTooltip} from "../../dialog/tooltip";+import {fetchPost} from "../../util/fetch";+import {openFileById} from "../../editor/util";export const initWindowEvent = (app: App) => {document.body.addEventListener("mouseleave", () => {@@ -151,6 +153,25 @@ export const initWindowEvent = (app: App) => {event.preventDefault();return;}++ const backlinkBreadcrumbItemElement = hasClosestByClassName(target, "protyle-breadcrumb__item");+ if (backlinkBreadcrumbItemElement) {+ const breadcrumbId = backlinkBreadcrumbItemElement.getAttribute("data-id")||backlinkBreadcrumbItemElement.getAttribute("data-node-id");+ if (breadcrumbId) {+ fetchPost("/api/block/checkBlockFold", {id: breadcrumbId}, (foldResponse) => {+ openFileById({+ app,+ id: breadcrumbId,+ action: foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT],+ zoomIn: foldResponse.data+ });+ window.siyuan.menus.menu.remove();+ });+ }+ event.stopImmediatePropagation();+ event.preventDefault();+ return;+ }}}, false);};