import { type JSX } from "react"; /** * Renders agent-core's `ask_user` questions. A single question shows inline; * several render as tabs (one per question) plus a final Submit tab that * reviews the answers, the same flow as the CLI's ink form. Each question * defaults to its first option (so a recommended option listed first is * pre-selected), and a free-text answer counts only once something is typed. * * The card is presentation only: it reports answers through `onSubmit` and * the host owns the wire protocol. `toUserInputResponse` builds the * `userInputResponse` message the extension host expects. */ export interface QuestionOption { label: string; description?: string; } export interface QuestionPayload { id: string; question: string; header?: string; options?: QuestionOption[]; /** Offer a typed answer alongside the options. Defaults to true. */ allowFreeform?: boolean; } export interface QuestionCardProps { /** Request id, echoed back through `onSubmit`. */ id: string; questions: QuestionPayload[]; onSubmit: (id: string, answers: Record, cancelled?: boolean) => void; /** Heading for the card. */ title?: string; /** * Focus the card when it mounts so Enter and Esc work without a click * (default `true`). The focus never scrolls the page. Pass `false` where * the card is not the user's current task, e.g. a demo further down a page. */ autoFocus?: boolean; } /** The `userInputResponse` message for the extension host protocol. */ export interface UserInputResponseMessage { type: "userInputResponse"; id: string; answers: Record; cancelled?: boolean; } export declare const toUserInputResponse: (id: string, answers: Record, cancelled?: boolean) => UserInputResponseMessage; export declare const QuestionCard: ({ id, questions, onSubmit, title, autoFocus }: QuestionCardProps) => JSX.Element; //# sourceMappingURL=QuestionCard.d.ts.map