/** * The questionnaire panel — Claude Code style ask-user-question UI for the * DSH user-interaction seam. One question per panel (progress header, header * chip, wrapped question text, optional detail, option list with focus * pointer and multi-select checkmarks), styled in the dsh-tui mist-blue * design language. * * The list's last row IS the free-text input (issue #9): no Tab, no mode * switch — the view never changes. Typing while focused on a real option * appends into that input row (single-select also attaches the option's * label, so the answer can carry both `selected` and `custom`); focusing * the input row itself and typing gives a pure custom answer. */ import React from 'react'; import type { QuestionDraft, QuestionFeedback, QuestionSelection } from '../../dsh-adapter/questions.js'; export type AskUserQuestionPanelProps = { /** The question to render (from the QuestionStore snapshot). */ readonly question: { readonly question: string; readonly header?: string; readonly detail?: string; /** Persistent local validation/test result, separate from neutral detail. */ readonly feedback?: QuestionFeedback; readonly options?: ReadonlyArray<{ readonly label: string; readonly description?: string; /** Local form layout: value displayed beside the field label. */ readonly value?: string; /** Local form layout: render this option in the bottom action bar. */ readonly action?: boolean; }>; readonly multiSelect?: boolean; /** Hide the trailing free-text input row for pure option questions * (local wizards, e.g. /provider). Ignored when there are no options — * a text-only question would otherwise be unanswerable. */ readonly hideCustomInput?: boolean; /** Pre-checked option labels (multi-select) / default-focused option * (single-select) shown on first display, before any saved draft — e.g. * the models already enabled on a provider being edited. */ readonly defaultSelected?: readonly string[]; /** Mask the local free-text row while keeping its real value in memory. * Used by credential wizards; the answer store separately redacts the * completed transcript summary. */ readonly secretInput?: boolean; /** Render a compact field/value editor like the native model form. */ readonly formLayout?: boolean; /** Render a compact numbered action menu without radio markers. */ readonly menuLayout?: boolean; /** Explanatory copy rendered below a compact form's rows. */ readonly formFooter?: string; /** Compact form keyboard hint; omission uses the generic form hint. */ readonly formHint?: string; /** Presentation intent tag (rc.6): 'plan-review' switches to the * decision-card layout; an intent never changes the protocol. */ readonly intent?: { readonly kind: 'plan-review'; readonly approve: string; }; }; /** 1-based position within the batch (progress header). */ readonly position: number; /** Total questions in the batch (progress header). */ readonly total: number; /** Questions answered before the current one. */ readonly answered: number; /** Previously saved answer or draft, restored when returning to this item. */ readonly initialDraft?: QuestionDraft; readonly onAnswer: (selection: QuestionSelection) => void; /** Esc on the first question / Ctrl+C — aborts the whole ask. */ readonly onCancel: () => void; /** Esc on later questions — navigates to the previous question. */ readonly onBack?: (draft: QuestionDraft) => void; }; export declare function AskUserQuestionPanel({ question, position, total, answered, initialDraft, onAnswer, onCancel, onBack, }: AskUserQuestionPanelProps): React.ReactNode; //# sourceMappingURL=AskUserQuestionPanel.d.ts.map