Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: https://github.com/siyuan-note/siyuan/issues/7536

Vanessa894611465688
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts
index d9cbf487c9..6bdce785ec 100644
--- a/app/src/protyle/render/av/action.ts
+++ b/app/src/protyle/render/av/action.ts
@@ -101,11 +101,10 @@ export const avContextmenu = (protyle: IProtyle, event: MouseEvent & { detail: a
click() {
transaction(protyle, [{
action: "removeAttrViewBlock",
- id: blockElement.getAttribute("data-node-id"),
+ srcIDs: [rowId],
parentID: blockElement.getAttribute("data-av-id"),
}], [{
action: "insertAttrViewBlock",
- id: blockElement.getAttribute("data-node-id"),
parentID: blockElement.getAttribute("data-av-id"),
previousID: rowElement.previousElementSibling?.getAttribute("data-id") || "",
srcIDs: [rowId],
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts
index 36afc44d88..95882878dd 100644
--- a/app/src/protyle/util/editorCommonEvent.ts
+++ b/app/src/protyle/util/editorCommonEvent.ts
@@ -804,13 +804,12 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
}
transaction(protyle, [{
action: "insertAttrViewBlock",
- id: blockElement.getAttribute("data-node-id"),
parentID: blockElement.getAttribute("data-av-id"),
previousID,
srcIDs: sourceIds,
}], [{
action: "removeAttrViewBlock",
- id: targetElement.getAttribute("data-node-id"),
+ srcIDs: sourceIds,
parentID: targetElement.getAttribute("data-av-id"),
}]);
}