Skip to content

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

:sparkles: AI Agent https://github.com/siyuan-note/siyuan/issues/17797

Danielc8f3e06ef77f
diff --git a/kernel/mcp/tools/block.go b/kernel/mcp/tools/block.go
index d1e77e1420..f39268baec 100644
--- a/kernel/mcp/tools/block.go
+++ b/kernel/mcp/tools/block.go
@@ -178,6 +178,7 @@ func blockInsert(args map[string]interface{}) (CallToolResult, error) {
model.PerformTransactions(&transactions)
model.FlushTxQueue()
+ model.AppendPushReloadProtyleEntry(parentID)
return CallToolResult{Content: []ContentItem{{Type: "text", Text: "block inserted"}}}, nil
}
@@ -209,6 +210,7 @@ func blockAppend(args map[string]interface{}) (CallToolResult, error) {
model.PerformTransactions(&transactions)
model.FlushTxQueue()
+ model.AppendPushReloadProtyleEntry(parentID)
return CallToolResult{Content: []ContentItem{{Type: "text", Text: "block appended"}}}, nil
}
@@ -240,6 +242,7 @@ func blockPrepend(args map[string]interface{}) (CallToolResult, error) {
model.PerformTransactions(&transactions)
model.FlushTxQueue()
+ model.AppendPushReloadProtyleEntry(parentID)
return CallToolResult{Content: []ContentItem{{Type: "text", Text: "block prepended"}}}, nil
}
@@ -271,6 +274,7 @@ func blockUpdate(args map[string]interface{}) (CallToolResult, error) {
model.PerformTransactions(&transactions)
model.FlushTxQueue()
+ model.AppendPushReloadProtyleEntry(id)
return CallToolResult{Content: []ContentItem{{Type: "text", Text: "block updated"}}}, nil
}
@@ -289,6 +293,7 @@ func blockDelete(args map[string]interface{}) (CallToolResult, error) {
model.PerformTransactions(&transactions)
model.FlushTxQueue()
+ model.AppendPushReloadProtyleEntry(id)
return CallToolResult{Content: []ContentItem{{Type: "text", Text: "block deleted: " + id}}}, nil
}
@@ -333,6 +338,7 @@ func blockMove(args map[string]interface{}) (CallToolResult, error) {
model.PerformTransactions(&transactions)
model.FlushTxQueue()
+ model.AppendPushReloadProtyleEntry(id)
return CallToolResult{Content: []ContentItem{{Type: "text", Text: "block moved: " + id}}}, nil
}