An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: https://github.com/siyuan-note/siyuan/issues/6648
Vanessaa543ec97a549
diff --git a/app/src/protyle/undo/index.ts b/app/src/protyle/undo/index.tsindex ba14dfac99..b105c4ef9c 100644--- a/app/src/protyle/undo/index.ts+++ b/app/src/protyle/undo/index.ts@@ -50,7 +50,7 @@ export class Undo {}private render(protyle: IProtyle, state: IOperations, redo: boolean) {- hideElements(["hint"], protyle);+ hideElements(["hint", "gutter"], protyle);protyle.wysiwyg.lastHTMLs = {};if (!redo) {state.undoOperations.forEach(item => {diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.tsindex cc620b09ac..87ce306d99 100644--- a/app/src/protyle/util/editorCommonEvent.ts+++ b/app/src/protyle/util/editorCommonEvent.ts@@ -18,6 +18,7 @@ import {blockRender} from "../markdown/blockRender";import {uploadLocalFiles} from "../upload";import {insertHTML} from "./insertHTML";import {isBrowser} from "../../util/functions";+import {hideElements} from "../ui/hideElements";const moveTo = async (protyle: IProtyle, sourceElements: Element[], targetElement: Element, isSameDoc: boolean, position: InsertPosition) => {let topSourceElement@@ -183,6 +184,7 @@ const dragSb = async (protyle: IProtyle, sourceElements: Element[], targetElemen});} else {const foldHeadingIds: { id: string, parentID: string }[] = []+ let afterPreviousIDsourceElements.reverse().forEach((item, index) => {const id = item.getAttribute("data-node-id");const parentID = item.parentElement.getAttribute("data-node-id") || protyle.block.rootID@@ -192,6 +194,9 @@ const dragSb = async (protyle: IProtyle, sourceElements: Element[], targetElementopSourceElement = undefined;}}+ if (index === 0) {+ afterPreviousID = id;+ }if (item.getAttribute("data-type") === "NodeHeading" && item.getAttribute("fold") === "1") {item.removeAttribute("fold");foldHeadingIds.push({id, parentID});@@ -217,7 +222,6 @@ const dragSb = async (protyle: IProtyle, sourceElements: Element[], targetElemen});});undoOperations.reverse();- let afterPreviousIDfor (let j = 0; j < foldHeadingIds.length; j++) {const childrenItem = foldHeadingIds[j];const headingIds = await fetchSyncPost("/api/block/getHeadingChildrenIDs", {id: childrenItem.id});@@ -250,11 +254,11 @@ const dragSb = async (protyle: IProtyle, sourceElements: Element[], targetElemenparentID: sbElement.getAttribute("data-node-id")});} else {- sbElement.insertAdjacentElement("beforeend", targetElement);+ sbElement.lastElementChild.insertAdjacentElement("beforebegin", targetElement);doOperations.push({action: "move",id: targetElement.getAttribute("data-node-id"),- previousID: afterPreviousID || doOperations[0].id+ previousID: afterPreviousID});}}@@ -675,6 +679,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {insertHTML(protyle.lute.SpinBlockDOM(html), protyle, true);blockRender(protyle, protyle.wysiwyg.element);} else if (targetElement) {+ hideElements(["gutter"], protyle)const targetClass = targetElement.className.split(" ");targetElement.classList.remove("dragover__bottom", "dragover__top", "dragover__left", "dragover__right", "protyle-wysiwyg--select");if (targetElement.parentElement.getAttribute("data-type") === "NodeSuperBlock" &&