Skip to content

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

:art: 支持合并子文档导出 Word/PDF https://github.com/siyuan-note/siyuan/issues/3219

Liang Ding954642023d28
diff --git a/kernel/model/file.go b/kernel/model/file.go
index 2e5f800c35..577e3d6289 100644
--- a/kernel/model/file.go
+++ b/kernel/model/file.go
@@ -660,7 +660,7 @@ func GetDoc(startID, endID, id string, index int, keyword string, mode int, size
luteEngine.RenderOptions.NodeIndexStart = index
dom = luteEngine.Tree2BlockDOM(subTree, luteEngine.RenderOptions)
- SetRecentDocByTree(id, tree)
+ SetRecentDocByTree(tree)
return
}
diff --git a/kernel/model/storage.go b/kernel/model/storage.go
index 4d3520f13f..cf6252baec 100644
--- a/kernel/model/storage.go
+++ b/kernel/model/storage.go
@@ -30,11 +30,8 @@ import (
type RecentDoc struct {
RootID string `json:"rootID"`
- ID string `json:"id"`
Icon string `json:"icon"`
Title string `json:"title"`
- Mode string `json:"mode"`
- Action string `json:"action"`
}
var recentDocLock = sync.Mutex{}
@@ -63,10 +60,9 @@ func RemoveRecentDoc(ids []string) {
return
}
-func SetRecentDocByTree(id string, tree *parse.Tree) {
+func SetRecentDocByTree(tree *parse.Tree) {
recentDoc := &RecentDoc{
RootID: tree.Root.ID,
- ID: id,
Icon: tree.Root.IALAttr("icon"),
Title: tree.Root.IALAttr("title"),
}