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/7196

Liang Ding9a67a5e5b18c
diff --git a/kernel/model/index.go b/kernel/model/index.go
index e2824f7234..e9d1114329 100644
--- a/kernel/model/index.go
+++ b/kernel/model/index.go
@@ -218,6 +218,7 @@ func updateEmbedBlockContent(embedBlockID string, queryResultBlocks []*EmbedBloc
return
}
+ embedBlock.Content = "" // 嵌入块每查询一次多一个结果 https://github.com/siyuan-note/siyuan/issues/7196
for _, block := range queryResultBlocks {
embedBlock.Content += block.Block.Markdown
}
diff --git a/kernel/model/search.go b/kernel/model/search.go
index 243db19d4d..c0c7adb93d 100644
--- a/kernel/model/search.go
+++ b/kernel/model/search.go
@@ -50,8 +50,6 @@ type EmbedBlock struct {
}
func SearchEmbedBlock(embedBlockID, stmt string, excludeIDs []string, headingMode int, breadcrumb bool) (ret []*EmbedBlock) {
- time.Sleep(util.FrontendQueueInterval)
- WaitForWritingFiles()
return searchEmbedBlock(embedBlockID, stmt, excludeIDs, headingMode, breadcrumb)
}