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/pull/13966
Vanessaa905742464f1
diff --git a/app/src/plugin/index.ts b/app/src/plugin/index.tsindex 68d0ead5b1..7750241001 100644--- a/app/src/plugin/index.ts+++ b/app/src/plugin/index.ts@@ -162,7 +162,7 @@ export class Plugin {public addTopBar(options: {icon: string,title: string,- position?: "right" | "left",+ position?: "south" | "left",callback: (evt: MouseEvent) => void}) {if (!options.icon.startsWith("icon") && !options.icon.startsWith("<svg")) {@@ -182,7 +182,7 @@ export class Plugin {iconElement.setAttribute("aria-label", options.title);iconElement.innerHTML = options.icon.startsWith("icon") ? `<svg><use xlink:href="#${options.icon}"></use></svg>` : options.icon;iconElement.addEventListener("click", options.callback);- iconElement.setAttribute("data-position", options.position || "right");+ iconElement.setAttribute("data-location", options.position || "right");}this.topBarIcons.push(iconElement);return iconElement;@@ -193,7 +193,7 @@ export class Plugin {position?: "right" | "left",}) {/// #if !MOBILE- options.element.setAttribute("data-position", options.position || "right");+ options.element.setAttribute("data-location", options.position || "right");this.statusBarIcons.push(options.element);return options.element;/// #endifdiff --git a/app/src/plugin/loader.ts b/app/src/plugin/loader.tsindex c7ca4eec60..3ff090a5c8 100644--- a/app/src/plugin/loader.ts+++ b/app/src/plugin/loader.ts@@ -132,7 +132,7 @@ export const afterLoadPlugin = (plugin: Plugin) => {if (window.siyuan.storage[Constants.LOCAL_PLUGINTOPUNPIN].includes(element.id)) {element.classList.add("fn__none");}- document.querySelector("#" + (element.getAttribute("data-position") === "right" ? "barPlugins" : "drag")).before(element);+ document.querySelector("#" + (element.getAttribute("data-location") === "right" ? "barPlugins" : "drag")).before(element);}});}@@ -140,7 +140,7 @@ export const afterLoadPlugin = (plugin: Plugin) => {resizeTopBar();plugin.statusBarIcons.forEach(element => {const statusElement = document.getElementById("status");- if (element.getAttribute("data-position") === "right") {+ if (element.getAttribute("data-location") === "right") {statusElement.insertAdjacentElement("beforeend", element);} else {statusElement.insertAdjacentElement("afterbegin", element);