import { type KeyboardEvent } from 'react'; export interface ComposerHistory { /** Composers with the same name in a tab share one history, which ends with the tab. */ name: string; /** What was sent before or beyond this tab, oldest first, such as the * messages of a conversation reopened here. */ seed?: readonly string[] | undefined; /** Text to forget, such as a command carrying a secret: no history, no draft, no return from a failed send. */ skip?: ((text: string) => boolean) | undefined; } /** ↑ and ↓ step through what was sent, as a shell's history does. A walk starts * from an empty box, so arrows in a draft still move the caret. Moving the caret * off the end of a recalled entry hands the arrows back too, so a long entry * can be edited. In a composer with `shell`, a walk begun on a bare `!` steps * through shell commands only, as a terminal's shell mode does. */ export declare function useComposerHistory(history: ComposerHistory | undefined, input: string, setInput: (value: string) => void, shell?: boolean): { recalled: boolean; record: (text: string) => void; handleKey: (e: KeyboardEvent) => boolean; leave: () => void; };