Skip to content

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

:art: 支持列出和切换最近打开的文档 https://github.com/siyuan-note/siyuan/issues/3293

Liang Ding56511a96d86a
diff --git a/kernel/model/storage.go b/kernel/model/storage.go
index e84fc4501d..5027246b79 100644
--- a/kernel/model/storage.go
+++ b/kernel/model/storage.go
@@ -29,13 +29,12 @@ import (
)
type RecentDoc struct {
- RootID string `json:"rootID"`
- ID string `json:"id"`
- Icon string `json:"icon"`
- Title string `json:"title"`
- ScrollAttr string `json:"scrollAttr"`
- Mode string `json:"mode"`
- Action string `json:"action"`
+ 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{}
@@ -66,11 +65,10 @@ func RemoveRecentDoc(ids []string) {
func SetRecentDocByTree(id string, tree *parse.Tree) {
recentDoc := &RecentDoc{
- RootID: tree.Root.ID,
- ID: id,
- Icon: tree.Root.IALAttr("icon"),
- Title: tree.Root.IALAttr("title"),
- ScrollAttr: tree.Root.IALAttr("scroll"),
+ RootID: tree.Root.ID,
+ ID: id,
+ Icon: tree.Root.IALAttr("icon"),
+ Title: tree.Root.IALAttr("title"),
}
SetRecentDoc(recentDoc)