An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/7708
Vanessa1ec4bb950c9b
diff --git a/app/electron/main.js b/app/electron/main.jsindex cf5953a4ab..a89868cd7b 100644--- a/app/electron/main.js+++ b/app/electron/main.js@@ -57,13 +57,17 @@ const exitApp = (port, errorWindowId) => {// 关闭端口相同的所有非主窗口BrowserWindow.getAllWindows().forEach((item) => {- const currentURL = new URL(item.getURL())- if (port.toString() === currentURL.port.toString()) {- if (currentURL.href.indexOf("/stage/build/app/?v=") > -1) {- mainWindow = item;- } else {- item.destroy();+ try {+ const currentURL = new URL(item.getURL())+ if (port.toString() === currentURL.port.toString()) {+ if (currentURL.href.indexOf("/stage/build/app/?v=") > -1) {+ mainWindow = item;+ } else {+ item.destroy();+ }}+ } catch (e) {+ // load file is not a url}});workspaces.find((item, index) => {