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: Treat the renaming of tags and assets as a data history `Replace` operation https://github.com/siyuan-note/siyuan/issues/17407
Daniel1654612867f1
diff --git a/kernel/model/assets.go b/kernel/model/assets.goindex f61266a055..c751b44057 100644--- a/kernel/model/assets.go+++ b/kernel/model/assets.go@@ -935,6 +935,7 @@ func RenameAsset(oldPath, newName string) (newPath string, err error) {return}+ historyDir, err := getHistoryDir(HistoryOpReplace, time.Now())luteEngine := util.NewLute()for _, notebook := range notebooks {pages := pagedPaths(filepath.Join(util.DataDir, notebook.ID), 32)@@ -967,6 +968,7 @@ func RenameAsset(oldPath, newName string) (newPath string, err error) {continue}+ generateTreeHistory(historyDir, tree)treenode.UpsertBlockTree(tree)sql.UpsertTreeQueue(tree)@@ -974,6 +976,7 @@ func RenameAsset(oldPath, newName string) (newPath string, err error) {}}}+ indexHistoryDir(filepath.Base(historyDir), util.NewLute())storageAvDir := filepath.Join(util.DataDir, "storage", "av")if gulu.File.IsDir(storageAvDir) {