Skip to content

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

:recycle: Improve outline loading mechanism https://github.com/siyuan-note/siyuan/issues/10884

Daniel6c812b1ca986
diff --git a/kernel/util/websocket.go b/kernel/util/websocket.go
index 9cae9cd4c6..8683157393 100644
--- a/kernel/util/websocket.go
+++ b/kernel/util/websocket.go
@@ -221,12 +221,13 @@ func PushReloadDoc(rootID string) {
}
func PushSaveDoc(rootID, typ string, sources interface{}) {
- data := map[string]interface{}{
+ evt := NewCmdResult("savedoc", 0, PushModeBroadcast)
+ evt.Data = map[string]interface{}{
"rootID": rootID,
"type": typ,
"sources": sources,
}
- BroadcastByType("main", "savedoc", 0, "", data)
+ PushEvent(evt)
}
func PushProtyleReload(rootID string) {