/** * Extension dialog primitives: the selector, options pane, confirm, text * input, multi-line editor, and custom-component dialogs that swap into the * editor slot (or an overlay) and restore the prompt editor when done. * Extracted from interactive-mode.ts; consumed by the ExtensionUIContext. */ import type { Component, Container, OverlayHandle, OverlayOptions, TUI } from "@kolisachint/hoocode-tui"; import type { AskQuestion, ExtensionUIDialogOptions } from "../../core/extensions/index.js"; import type { KeybindingsManager } from "../../core/keybindings.js"; import { type Theme } from "./theme/theme.js"; /** The slice of the interactive mode the dialogs render into. */ export interface ExtensionDialogsDeps { ui: TUI; editorContainer: Container; keybindings: KeybindingsManager; /** The prompt editor (read at call time; the editor can be swapped). */ getEditor(): Component & { getText(): string; setText(text: string): void; }; } export declare class ExtensionDialogs { private readonly deps; private selector; private input; private askOptionsPane; private editorDialog; constructor(deps: ExtensionDialogsDeps); /** True while the options pane is on screen (used to queue team approvals). */ isAskOptionsOpen(): boolean; /** Hide whatever dialog is open and restore the prompt editor. */ reset(): void; private restoreEditor; /** * Show a selector for extensions. */ showSelector(title: string, options: string[], opts?: ExtensionUIDialogOptions): Promise; /** * Hide the extension selector. */ hideSelector(): void; /** * Show the options pane — the agent asking the user one or more questions. * Resolves with one answer per question, or undefined if skipped/aborted. */ showAskOptions(questions: AskQuestion[], opts?: ExtensionUIDialogOptions): Promise; /** * Hide the options pane and restore the editor. */ hideAskOptions(): void; /** * Show a confirmation dialog for extensions. */ confirm(title: string, message: string, opts?: ExtensionUIDialogOptions): Promise; /** * Show a text input for extensions. */ showInput(title: string, placeholder?: string, opts?: ExtensionUIDialogOptions): Promise; /** * Hide the extension input. */ hideInput(): void; /** * Show a multi-line editor for extensions (with Ctrl+G support). */ showEditor(title: string, prefill?: string): Promise; /** * Hide the extension editor. */ hideEditor(): void; /** Show a custom component with keyboard focus. Overlay mode renders on top of existing content. */ showCustom(factory: (tui: TUI, theme: Theme, keybindings: KeybindingsManager, done: (result: T) => void) => (Component & { dispose?(): void; }) | Promise, options?: { overlay?: boolean; overlayOptions?: OverlayOptions | (() => OverlayOptions); onHandle?: (handle: OverlayHandle) => void; }): Promise; } //# sourceMappingURL=extension-dialogs.d.ts.map