(e: KeyboardEvent)
| 260 | // This is a conditional behavior that doesn't fit the keybinding model |
| 261 | // well (backspace only cancels when query is empty) |
| 262 | const handleKeyDown = (e: KeyboardEvent): void => { |
| 263 | if (!isSearching) return |
| 264 | if (e.key === 'backspace' && historyQuery === '') { |
| 265 | e.preventDefault() |
| 266 | handleCancel() |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | // Backward-compat bridge: PromptInput doesn't yet wire handleKeyDown to |
| 271 | // <Box onKeyDown>. Subscribe via useInput and adapt InputEvent → |
no test coverage detected