Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/17508

Vanessa99feef9d4840
diff --git a/app/src/layout/Model.ts b/app/src/layout/Model.ts
index 02499228d7..aed0ae80ef 100644
--- a/app/src/layout/Model.ts
+++ b/app/src/layout/Model.ts
@@ -55,7 +55,9 @@ export class Model {
}
};
ws.onmessage = (event) => {
- if (options.msgCallback) {
+ if (options.msgCallback &&
+ // 等待 config 加载完成才接受推送 https://github.com/siyuan-note/siyuan/issues/17508
+ window.siyuan.config) {
const data = processMessage(JSON.parse(event.data));
options.msgCallback.call(this, data);
}