/** * Ask question dialog component. * Shows a question with either selectable options or free-text input. * Used by the ask_user tool to collect structured answers from the user. */ import { Box } from '@earendil-works/pi-tui'; import type { Focusable, TUI } from '@earendil-works/pi-tui'; import type { AskQuestionSelectionMode } from './ask-question-inline.js'; export interface AskQuestionDialogOptions { question: string; options?: Array<{ label: string; description?: string; }>; /** Controls whether options are single- or multi-select. Defaults to single_select. */ selectionMode?: AskQuestionSelectionMode; /** * Use a multiline editor for free-text input (Shift+Enter / \+Enter for new lines). * Defaults to false. Enable for prompts that legitimately want paragraph-length replies. */ multiline?: boolean; allowEmptyInput?: boolean; defaultValue?: string; allowCustomResponse?: boolean; selectedOptionLabel?: string; tui?: TUI; onSubmit: (answer: string) => void; /** * Called instead of `onSubmit` when the prompt is multi-select, with every selected * option label. Falls back to `onSubmit` with a comma-joined string when omitted. */ onSubmitMulti?: (answers: string[]) => void; onCancel: () => void; } export declare class AskQuestionDialogComponent extends Box implements Focusable { private static readonly CUSTOM_RESPONSE_VALUE; private selectList?; private input?; private tui?; private multiline; private multiSelect; private allowEmptyInput; private defaultValue?; private allowCustomResponse; private selectedOptionLabel?; private onSubmit; private onSubmitMulti?; private onCancel; /** Children added by buildSelectMode/buildInputMode, tracked for removal on mode switch */ private modeChildren; private _focused; get focused(): boolean; set focused(value: boolean); constructor(options: AskQuestionDialogOptions); private buildSelectMode; /** Whether this prompt should render a multiline editor (vs a single-line input). */ private useMultiline; private buildInputMode; private switchToCustomInput; handleInput(data: string): void; } //# sourceMappingURL=ask-question-dialog.d.ts.map