import type React from 'react'; /** * How a plain message typed mid-run should be delivered to the agent. * Mirrors the WebUI's `QueueMode` vocabulary (ChatInput.tsx). */ export type SendMode = 'queue' | 'btw' | 'steer'; export interface SendModeOption { mode: SendMode; /** Quick-select key (lower-case). */ key: string; label: string; description: string; color: string; } /** * The three delivery modes, Queue first so it is the default highlight and * the safest no-op-to-in-flight-work choice. Order is load-bearing: the * reducer indexes selection into this array. */ export declare const SEND_MODE_OPTIONS: SendModeOption[]; /** * Clamp-free wrap-around index move. `delta` is +1 (down) / -1 (up). * Pure — unit-tested independently of Ink. */ export declare function nextSendModeIndex(selected: number, delta: number, len: number): number; /** A minimal structural view of the key event — keeps the helper pure/testable. */ export interface SendModeKey { upArrow?: boolean | undefined; downArrow?: boolean | undefined; return?: boolean | undefined; escape?: boolean | undefined; } /** * Map a keypress to a picker decision. Returns: * - a `SendMode` when the user committed a choice (quick-key or Enter), * - `'cancel'` on Esc, * - `null` when the key only moves the selection / is irrelevant * (the caller handles `↑/↓` movement separately). * * Pure: no Ink, no React. The single source of truth for key semantics. */ export declare function sendModeFromKey(input: string, key: SendModeKey, selected: number): SendMode | 'cancel' | null; export declare function formatSendModeMessagePreview(text: string, maxChars?: number): string; export interface SendModePickerProps { selected: number; /** The message being routed, shown so the modal question has context. */ messagePreview?: string | undefined; /** Move the highlight by `delta` (caller clamps/wraps via nextSendModeIndex). */ onMove: (delta: number) => void; /** Commit a decision (quick-key / Enter) or cancel (Esc → 'cancel'). */ onSelect: (decision: SendMode | 'cancel') => void; } /** * Modal shown when the user submits a plain message while the agent is busy. * Self-contained input handling (own `useInput`) like {@link EscConfirmPrompt}; * the main input is gated off via a handleKey early-return while this is open. * * - q / b / s → pick that mode immediately * - ↑ / ↓ → move the highlight * - Enter → pick the highlighted mode * - Esc → cancel (caller restores the draft to the composer) */ export declare function SendModePicker({ selected, messagePreview, onMove, onSelect, }: SendModePickerProps): React.ReactElement; //# sourceMappingURL=send-mode-picker.d.ts.map