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: Clean code
Daniel744dc2b7f359
diff --git a/app/src/layout/tabUtil.ts b/app/src/layout/tabUtil.tsindex 0c520ddda4..6e25b33592 100644--- a/app/src/layout/tabUtil.ts+++ b/app/src/layout/tabUtil.ts@@ -270,9 +270,9 @@ export const copyTab = (app: App, tab: Tab) => {afterInitProtyle(editor) {// https://github.com/siyuan-note/siyuan/issues/13851if (tab.model instanceof Editor) {- const copyResizeTopElement = tab.model.editor.protyle.wysiwyg.element.querySelector("[data-resize-top]")+ const copyResizeTopElement = tab.model.editor.protyle.wysiwyg.element.querySelector("[data-resize-top]");if (copyResizeTopElement) {- const newElement = editor.protyle.wysiwyg.element.querySelector(`[data-node-id="${copyResizeTopElement.getAttribute("data-node-id")}"]`)+ const newElement = editor.protyle.wysiwyg.element.querySelector(`[data-node-id="${copyResizeTopElement.getAttribute("data-node-id")}"]`);if (newElement) {editor.protyle.observerLoad?.disconnect();newElement.scrollIntoView();diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.tsindex 845c31bb34..d2721b86ae 100644--- a/app/src/protyle/wysiwyg/remove.ts+++ b/app/src/protyle/wysiwyg/remove.ts@@ -194,11 +194,11 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, ranghideElements(["util"], protyle);if (!sideElement) {- const backlinkElement = hasClosestByClassName(protyle.element, "sy__backlink", true)+ const backlinkElement = hasClosestByClassName(protyle.element, "sy__backlink", true);if (backlinkElement) {const backLinkTab = getInstanceById(backlinkElement.getAttribute("data-id"), window.siyuan.layout.layout);if (backLinkTab instanceof Tab && backLinkTab.model instanceof Backlink) {- const editors = backLinkTab.model.editors+ const editors = backLinkTab.model.editors;editors.find((item, index) => {if (item.protyle.element.isSameNode(protyle.element)) {item.destroy();