Skip to content

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

:sparkles: Command Line Interface https://github.com/siyuan-note/siyuan/issues/17674

Daniel0e73daf7e8db
diff --git a/kernel/cli/cmd/block.go b/kernel/cli/cmd/block.go
index cc78803b13..be5a62724b 100644
--- a/kernel/cli/cmd/block.go
+++ b/kernel/cli/cmd/block.go
@@ -202,7 +202,7 @@ var blockInsertCmd = &cobra.Command{
}}
model.PerformTransactions(&transactions)
model.FlushTxQueue()
- model.AppendPushSavedocEntry(parentID)
+ model.AppendPushReloadProtyleEntry(parentID)
fmt.Println("ok")
return nil
},
@@ -228,7 +228,7 @@ var blockAppendCmd = &cobra.Command{
}}
model.PerformTransactions(&transactions)
model.FlushTxQueue()
- model.AppendPushSavedocEntry(parentID)
+ model.AppendPushReloadProtyleEntry(parentID)
fmt.Println("ok")
return nil
},
@@ -254,7 +254,7 @@ var blockPrependCmd = &cobra.Command{
}}
model.PerformTransactions(&transactions)
model.FlushTxQueue()
- model.AppendPushSavedocEntry(parentID)
+ model.AppendPushReloadProtyleEntry(parentID)
fmt.Println("ok")
return nil
},
@@ -280,7 +280,7 @@ var blockUpdateCmd = &cobra.Command{
}}
model.PerformTransactions(&transactions)
model.FlushTxQueue()
- model.AppendPushSavedocEntry(id)
+ model.AppendPushReloadProtyleEntry(id)
fmt.Println("ok")
return nil
},
@@ -303,7 +303,7 @@ var blockDeleteCmd = &cobra.Command{
}}
model.PerformTransactions(&transactions)
model.FlushTxQueue()
- model.AppendPushSavedocEntry(id)
+ model.AppendPushReloadProtyleEntry(id)
fmt.Println(id)
return nil
},
@@ -330,7 +330,7 @@ var blockMoveCmd = &cobra.Command{
}}
model.PerformTransactions(&transactions)
model.FlushTxQueue()
- model.AppendPushSavedocEntry(id)
+ model.AppendPushReloadProtyleEntry(id)
fmt.Println("ok")
return nil
},
diff --git a/kernel/model/push_queue.go b/kernel/model/push_queue.go
index 8efacb3972..b204321d59 100644
--- a/kernel/model/push_queue.go
+++ b/kernel/model/push_queue.go
@@ -71,8 +71,8 @@ func AppendPushReloadDocInfoEntry(box, p string) {
appendPushEntry(pushEntry{Action: "reloadDocInfo", Box: box, Path: p})
}
-func AppendPushSavedocEntry(id string) {
- appendPushEntry(pushEntry{Action: "savedoc", ID: id})
+func AppendPushReloadProtyleEntry(id string) {
+ appendPushEntry(pushEntry{Action: "reloadProtyle", ID: id})
}
func AppendPushReloadFiletreeEntry() {
@@ -153,10 +153,10 @@ func PollPushQueue() {
renderer := render.NewJSONRenderer(tree, luteEngine.RenderOptions, luteEngine.ParseOptions)
size := uint64(len(renderer.Render()))
refreshDocInfo0(tree, size)
- case "savedoc":
+ case "reloadProtyle":
bt := treenode.GetBlockTree(e.ID)
if bt != nil {
- util.PushSaveDoc(bt.RootID, "cli", nil)
+ util.PushReloadProtyle(bt.RootID)
}
case "reloadFiletree":
util.BroadcastByType("filetree", "reloadFiletree", 0, "", nil)