Skip to content

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

:art: Support adding the current document in the database https://github.com/siyuan-note/siyuan/issues/10912

Daniel2bbd1a89d0e3
diff --git a/kernel/model/search.go b/kernel/model/search.go
index d36a500a9f..d3e7d53785 100644
--- a/kernel/model/search.go
+++ b/kernel/model/search.go
@@ -369,7 +369,7 @@ func SearchRefBlock(id, rootID, keyword string, beforeLen int, isSquareBrackets
b.RefText = getBlockRefText(b.ID, tree)
hitFirstChildID := false
- if b.IsContainerBlock() {
+ if b.IsContainerBlock() && "NodeDocument" != b.Type {
// `((` 引用候选中排除当前块的父块 https://github.com/siyuan-note/siyuan/issues/4538
tree := cachedTrees[b.RootID]
if nil == tree {