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/10962

Vanessa3b339656c9d3
diff --git a/app/electron/main.js b/app/electron/main.js
index 0bae340644..76308e509d 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -1202,7 +1202,9 @@ app.whenReady().then(() => {
app.on("open-url", async (event, url) => { // for macOS
if (url.startsWith("siyuan://")) {
+ let isBackground = true;
if (workspaces.length === 0) {
+ isBackground = false;
let index = 0;
while (index < 10) {
index++;
@@ -1212,6 +1214,9 @@ app.on("open-url", async (event, url) => { // for macOS
}
}
}
+ if (!isBackground) {
+ await sleep(1500);
+ }
workspaces.forEach(item => {
if (item.browserWindow && !item.browserWindow.isDestroyed()) {
item.browserWindow.webContents.send("siyuan-open-url", url);