/
aqa
/
claude-code
Обзор
Документация
Войти
/
aqa
/
claude-code
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
hooks/useExitOnCtrlCDWithKeybindings.ts
24 строки
948 B
kuberwastaken
new initial commit (history rewritten)
01 апр 2026, 14:57
01 апр 2026, 14:57
c1996f2
Код
Авторство
О чём код?
import { useKeybindings } from '../keybindings/useKeybinding.js' import { type ExitState, useExitOnCtrlCD } from './useExitOnCtrlCD.js' export type { ExitState } /** * Convenience hook that wires up useExitOnCtrlCD with useKeybindings. * * This is the standard way to use useExitOnCtrlCD in components. * The separation exists to avoid import cycles - useExitOnCtrlCD.ts * doesn't import from the keybindings module directly. * * @param onExit - Optional custom exit handler * @param onInterrupt - Optional callback for features to handle interrupt (ctrl+c). * Return true if handled, false to fall through to double-press exit. * @param isActive - Whether the keybinding is active (default true). */ export function useExitOnCtrlCDWithKeybindings( onExit?: () => void, onInterrupt?: () => boolean, isActive?: boolean, ): ExitState { return useExitOnCtrlCD(useKeybindings, onInterrupt, onExit, isActive) }