/** * The plan-review overlay. * * A completed plan is the decision a person needs to make, not incidental * detail on an option picker. The review itself stays a decision surface: a * bounded preview of the plan alongside the choices, never a place to page * through the whole document. Reading the whole plan is a second, deliberate * mode entered with Ctrl+O — the same document, laid out as one continuous * scrollable body, exactly the way Ctrl+O expands a tool result. Returning * from it changes nothing about the pending decision: the selected choice is * preserved, and only the review surface's own Esc/Ctrl+C dismiss the review * to speak. * @module dshline/plan-review */ import type { TuiOverlay } from './slots.ts'; /** One answer offered by the plan-mode review tool. */ export interface PlanReviewChoice { /** Value returned to the caller when this choice is confirmed. */ readonly value: string; /** Label a person sees for this choice. */ readonly label: string; /** Consequence of this choice, when the caller supplied one. */ readonly description?: string; } /** Everything the plan-review overlay needs to render and settle. */ export interface PlanReviewSpec { /** Markdown plan submitted by the model for approval. */ readonly plan: string; /** The decision the caller is asking the person to make. */ readonly question: string; /** Choices supplied by the caller; the first is selected initially. */ readonly choices: readonly PlanReviewChoice[]; /** Called once with the selected value, or undefined after cancellation. */ settle(value: string | undefined): void; /** Asks the runner to redraw after scrolling or changing the selected choice. */ invalidate(): void; } /** * Render the completed plan as a bounded review, with a Ctrl+O document reader. * * @param spec - plan content, decision choices, and callbacks. * @returns an overlay that changes the choice with up/down or tab, and opens * full-plan inspection with Ctrl+O when the preview does not show it all. */ export declare function createPlanReviewOverlay(spec: PlanReviewSpec): TuiOverlay; //# sourceMappingURL=plan-review.d.ts.map