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

Vanessa34659973c1ae
diff --git a/app/src/boot/globalEvent/command/global.ts b/app/src/boot/globalEvent/command/global.ts
index 44b9db954e..5c3a4d8df5 100644
--- a/app/src/boot/globalEvent/command/global.ts
+++ b/app/src/boot/globalEvent/command/global.ts
@@ -274,11 +274,22 @@ export const globalCommand = (command: string, app: App) => {
}
return true;
}
- const tab = getActiveTab(false);
+
+ const tab = getActiveTab();
if (tab) {
tab.parent.removeTab(tab.id);
+ return true;
+ }
+ // https://github.com/siyuan-note/siyuan/issues/14729
+ if (window.siyuan.blockPanels.length > 0) {
+ window.siyuan.blockPanels[window.siyuan.blockPanels.length - 1]?.destroy();
+ return true;
+ }
+ const noFocusTab = getActiveTab(false);
+ if (noFocusTab) {
+ noFocusTab.parent.removeTab(noFocusTab.id);
+ return true;
}
- return true;
}
if (command === "closeOthers" || command === "closeAll") {
const tab = getActiveTab(false);