import { type Component, type OverlayHandle, type OverlayOptions, type TUI } from "@earendil-works/pi-tui"; import type { HostCustomUiState, HostCustomUiStateListener } from "../../core/extensions/index.js"; import type { KeybindingsManager } from "../../core/keybindings.ts"; import type { Theme } from "../interactive/theme/theme.js"; interface CustomUiOptions { purpose?: "prompt" | "navigation"; overlay?: boolean; deferInlineCustomUiFocus?: boolean; /** The component binds Ctrl+C itself; see ExtensionUIContext.custom options. */ handlesCtrlC?: boolean; /** The component claims internal UI actions such as the jump-to-bottom URL. */ handlesInternalUiAction?: boolean; /** Bound this overlay and reserve transcript scroll extent on the host. */ reserveTranscriptRows?: boolean; overlayOptions?: OverlayOptions | (() => OverlayOptions); onHandle?: (handle: OverlayHandle) => void; signal?: AbortSignal; } export declare class EngineCustomUiService { private readonly widgetIds; private readonly active; private nextId; private readonly write; private readonly keybindings; private readonly stateListeners; private readonly widgetReleaseListeners; setWidget(key: string, factory: ((tui: TUI, theme: Theme) => Component & { dispose?(): void; }) | undefined, placement?: "aboveEditor" | "belowEditor", scroll?: { maxHeight: number; maxHeightFraction?: number; }): void; constructor(write: (line: string) => void, keybindings: KeybindingsManager); custom(factory: (tui: TUI, theme: Theme, keybindings: KeybindingsManager, done: (result: T) => void) => (Component & { dispose?(): void; }) | Promise, options?: CustomUiOptions): Promise; getHostCustomUiState(): HostCustomUiState; onHostCustomUiStateChange(listener: HostCustomUiStateListener): () => void; onWidgetRelease(key: string, listener: () => void): () => void; focusHostInlineCustomUi(): boolean; requestRender(): void; handleLine(line: string): boolean; dispose(): void; private disposeComponent; private notifyWidgetRelease; private notifyState; private remoteHandle; private sendDone; private send; } export {}; //# sourceMappingURL=engine-custom-ui.d.ts.map