fix(ui): ignore prompt rail in escape abort guard
This commit is contained in:
@@ -16,6 +16,7 @@ import { useDirectoryStore } from '@/stores/useDirectoryStore';
|
||||
import { useProjectsStore } from '@/stores/useProjectsStore';
|
||||
import { getCycledPrimaryAgentName } from '@/components/chat/mobileControlsUtils';
|
||||
import { focusChatInput } from '@/components/chat/composer/editor/dom';
|
||||
import { hasOpenDropdown } from './keyboard-shortcut-dom';
|
||||
|
||||
export const useKeyboardShortcuts = () => {
|
||||
const openNewSessionDraft = useSessionUIStore((s) => s.openNewSessionDraft);
|
||||
@@ -93,13 +94,6 @@ export const useKeyboardShortcuts = () => {
|
||||
return target instanceof Element && Boolean(target.closest(dropdownTargetSelector));
|
||||
};
|
||||
|
||||
const hasOpenDropdown = () => {
|
||||
const openDropdowns = document.querySelectorAll<HTMLElement>(
|
||||
'[data-slot="dropdown-menu-content"], [data-slot="select-content"], [role="listbox"], [role="menu"], [data-radix-popper-content-wrapper]'
|
||||
);
|
||||
return Array.from(openDropdowns).some((element) => element.getClientRects().length > 0);
|
||||
};
|
||||
|
||||
const handleTerminalShortcutCapture = (e: KeyboardEvent) => {
|
||||
if (!isTerminalEventTarget(e.target)) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user