Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/9128

Vanessadc92bfdc8f20
diff --git a/app/src/window/closeWin.ts b/app/src/window/closeWin.ts
new file mode 100644
index 0000000000..09e2fe7998
--- /dev/null
+++ b/app/src/window/closeWin.ts
@@ -0,0 +1,9 @@
+import {App} from "../index";
+import {getCurrentWindow} from "@electron/remote";
+
+export const closeWindow = async (app: App) => {
+ for (let i = 0; i < app.plugins.length; i++) {
+ await app.plugins[i].onunload();
+ }
+ getCurrentWindow().destroy();
+}