diff --git a/apps/web/src/routes/_chat.tsx b/apps/web/src/routes/_chat.tsx index 55e1f2b285..36a45c05f1 100644 --- a/apps/web/src/routes/_chat.tsx +++ b/apps/web/src/routes/_chat.tsx @@ -42,6 +42,10 @@ function ChatRouteGlobalShortcuts() { terminalOpen, }, }); + if (useCommandPaletteStore.getState().open) { + return; + } + const isFocusedStandaloneTerminal = focusedWorkspaceSurface?.kind === "terminal"; if (command && isWorkspaceCommandId(command)) { event.preventDefault(); @@ -73,10 +77,6 @@ function ChatRouteGlobalShortcuts() { } } - if (useCommandPaletteStore.getState().open) { - return; - } - if (event.key === "Escape" && selectedThreadKeysSize > 0) { event.preventDefault(); clearSelection();