UNPKG

automagik-cli

Version:

Automagik CLI - A powerful command-line interface for interacting with Automagik Hive multi-agent AI systems

29 lines (28 loc) 928 B
/** * useKeypress hook copied from gemini-cli * Handles keyboard input with bracketed paste support */ export interface Key { name: string; ctrl: boolean; meta: boolean; shift: boolean; paste: boolean; sequence: string; } /** * A hook that listens for keypress events from stdin, providing a * key object that mirrors the one from Node's `readline` module, * adding a 'paste' flag for characters input as part of a bracketed * paste (when enabled). * * Pastes are currently sent as a single key event where the full paste * is in the sequence field. * * @param onKeypress - The callback function to execute on each keypress. * @param options - Options to control the hook's behavior. * @param options.isActive - Whether the hook should be actively listening for input. */ export declare function useKeypress(onKeypress: (key: Key) => void, { isActive }: { isActive: boolean; }): void;