Skip to content

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

:bug: fix https://github.com/siyuan-note/siyuan/issues/6760

Vanessa8a9a570b0ee5
diff --git a/app/src/layout/dock/Backlink.ts b/app/src/layout/dock/Backlink.ts
index fe0207f794..a62586336c 100644
--- a/app/src/layout/dock/Backlink.ts
+++ b/app/src/layout/dock/Backlink.ts
@@ -406,6 +406,7 @@ export class Backlink extends Model {
breadcrumb: false,
}
});
+ editor.protyle.notebookId = liElement.getAttribute("data-notebook-id");
this.editors.push(editor);
});
}
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index fe6203c2aa..cefe7d9a7b 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -513,6 +513,7 @@ declare interface IFile {
}
declare interface IBlockTree {
+ box: string,
nodeType: string,
hPath: string,
subType: string,
diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.ts
index e7096ab01b..fe092b8d54 100644
--- a/app/src/util/Tree.ts
+++ b/app/src/util/Tree.ts
@@ -76,8 +76,9 @@ export class Tree {
}
const hasChild = (item.children && item.children.length > 0) || (item.blocks && item.blocks.length > 0);
html += `<li class="b3-list-item"
-${(item.nodeType !== "NodeDocument" && item.type === "backlink") ? 'draggable="true"' : ""}
+${(item.nodeType !== "NodeDocument" && item.type === "backlink") ? 'draggable="true" ' : ""}
${item.id ? 'data-node-id="' + item.id + '"' : ""}
+${item.box ? 'data-notebook-id="' + item.box + '"' : ""}
data-treetype="${item.type}"
data-type="${item.nodeType}"
data-subtype="${item.subType}"