/** @jsxImportSource @opentui/react */ /** * Composer: completion menu above input; provider/model/permissions on the * top border. Focus is region-aware so transcript scroll is not stolen. */ import { type ReactNode } from "react"; import type { AppServices } from "../../ui-core/bootstrap/composition-root.js"; import type { Theme } from "../../ui-core/rendering/theme.js"; export interface ComposerEditorProps { readonly services: AppServices; readonly theme: Theme; readonly width: number; /** * Maximum editable text rows (not including the rounded border). * The box starts at 1 row and grows with content up to this cap. */ readonly height: number; /** The command window gets denser on tall terminals, never a one-row list. */ readonly maxSuggestions?: number | undefined; /** Mirrors the legacy composer hint while a turn is active. */ readonly running?: boolean | undefined; readonly inputSuspended?: boolean | undefined; /** Visual region focus from the shell (Tab cycle). */ readonly focused: boolean; /** * Esc while a turn runs: arm/cancel via the shared double-Esc handler * (shows "Esc again to cancel", second press cancels turn + queue + jobs). * Owned by App so the double-press window is shared with the global handler. */ readonly onEscapeCancel?: (() => void) | undefined; /** * When set (e.g. Edit on a queued prompt), replace the input with this * draft. `token` must change each time so the same text can be re-applied. */ readonly seedDraft?: { readonly token: number; readonly text: string; } | undefined; } export declare function ComposerEditor(props: ComposerEditorProps): ReactNode;