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/issues/7096
Liang Ding9c626ebc0bb9
diff --git a/kernel/sql/database.go b/kernel/sql/database.goindex a0e35aaa63..b11a120030 100644--- a/kernel/sql/database.go+++ b/kernel/sql/database.go@@ -342,8 +342,7 @@ func buildRef(tree *parse.Tree, refNode *ast.Node) *Ref {}func buildEmbedRef(tree *parse.Tree, embedNode *ast.Node) *Ref {- markdown := treenode.ExportNodeStdMd(embedNode, luteEngine)- defBlockID, text := getEmbedRef(embedNode)+ defBlockID := getEmbedRef(embedNode)var defBlockParentID, defBlockRootID, defBlockPath stringdefBlock := treenode.GetBlockTree(defBlockID)if nil != defBlock {@@ -362,19 +361,14 @@ func buildEmbedRef(tree *parse.Tree, embedNode *ast.Node) *Ref {RootID: tree.ID,Box: tree.Box,Path: tree.Path,- Content: text,- Markdown: markdown,+ Content: "",+ Markdown: "",Type: treenode.TypeAbbr(embedNode.Type.String()),}}-func getEmbedRef(embedNode *ast.Node) (queryBlockID, refText string) {+func getEmbedRef(embedNode *ast.Node) (queryBlockID string) {queryBlockID = treenode.GetEmbedBlockRef(embedNode)- if "" == queryBlockID {- return- }-- refText = getRefText(queryBlockID)return}