Skip to content

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

:art: mobile

Vanessae2c6115664b3
diff --git a/app/src/layout/Model.ts b/app/src/layout/Model.ts
index 43d97d0456..0d29f8c74f 100644
--- a/app/src/layout/Model.ts
+++ b/app/src/layout/Model.ts
@@ -39,6 +39,7 @@ export class Model {
const websocketURL = `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.host}/ws`;
const ws = new WebSocket(`${websocketURL}?app=${Constants.SIYUAN_APPID}&id=${options.id}${options.type ? "&type=" + options.type : ""}`);
ws.onopen = () => {
+ alert("onopen")
if (options.callback) {
options.callback.call(this);
}
@@ -61,7 +62,7 @@ export class Model {
}
};
ws.onclose = (ev) => {
- console.error("ws.onclose", ev)
+ alert(ev.reason)
if (0 <= ev.reason.indexOf("unauthenticated")) {
return;
}
@@ -78,7 +79,7 @@ export class Model {
}
};
ws.onerror = (err: Event & { target: { url: string, readyState: number } }) => {
- console.error("ws.onerror", err)
+ alert("onerror")
if (err.target.url.endsWith("&type=main") && err.target.readyState === 3) {
kernelError();
}