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/16883
Danieldc0b27e02b15
diff --git a/kernel/model/history.go b/kernel/model/history.goindex d1c5329e62..11da3f07d3 100644--- a/kernel/model/history.go+++ b/kernel/model/history.go@@ -680,7 +680,15 @@ func clearOutdatedHistoryDir(historyDir string) {logging.LogErrorf("read history dir [%s] failed: %s", dir.Name(), err)continue}- if dirInfo.ModTime().Unix() < ago {++ var nameTime int64+ if dirName := dirInfo.Name(); len(dirName) > len("2006-01-02-150405") {+ if t, parseErr := time.Parse("2006-01-02-150405", dirName[:len("2006-01-02-150405")]); nil == parseErr {+ nameTime = t.Unix()+ }+ }++ if dirInfo.ModTime().Unix() < ago || (0 != nameTime && nameTime < ago) {removes = append(removes, filepath.Join(historyDir, dir.Name()))}}