import { type Theme } from "../../theme.js"; import { type ToastKind, type ToastNotifier } from "../../ui.js"; import type { InputEditorDraftState } from "../../input-editor.js"; import type { Entry, ExtensionInputMouseEvent, ExtensionWidgetRegistration, ExtensionWidgetTheme, PixExtensionUIContext, PixEditorSnapshot, PixMenuController, WidgetPlacement, WidgetTuiHandle } from "../types.js"; export type ExtensionTerminalInputResult = { consume: boolean; data?: string; }; export type ExtensionUiControllerHost = { readonly theme: Theme; activeExtensionUiScope?(): string | undefined; isExtensionUiScopeActive?(scopeKey: string): boolean; isRunning(): boolean; render(): void; showToast(message: string, kind?: ToastKind, options?: { scopeKey?: string; }): void; readonly toastNotifier: ToastNotifier; toastNotifierForScope?(scopeKey: string | undefined): ToastNotifier; readonly menuController: PixMenuController; setStatus(status: string): void; restoreSessionStatus(): void; setInput(value: string): void; getInput(): string; setInputState(state: InputEditorDraftState): void; getInputState(): InputEditorDraftState; setInputSnapshot(snapshot: PixEditorSnapshot): void; getInputSnapshot(): PixEditorSnapshot; readonly entries: readonly Entry[]; deleteConversationEntry(entryId: string): void; }; export declare class ExtensionUiController { private readonly host; private readonly extensionWidgets; private readonly terminalInputHandlers; private readonly activeCustomUis; constructor(host: ExtensionUiControllerHost); get widgets(): ReadonlyMap; createExtensionTheme(): ExtensionWidgetTheme; setWidget(key: string, content: unknown, options?: { placement?: WidgetPlacement; scopeKey?: string; }): void; clearWidgets(scopeKey?: string, options?: { cancelCustomUi?: boolean; }): void; cancelCustomUi(scopeKey?: string): void; suppressWidget(key: string): void; handleTerminalInput(data: string): ExtensionTerminalInputResult; renderActiveCustomUi(width: number): string[] | undefined; activeCustomUiUsesEditor(): boolean; handleCustomUiMouse(event: ExtensionInputMouseEvent): boolean; widgetTuiHandle(scopeKey?: string): WidgetTuiHandle; createExtensionUIContext(scopeKey?: string): PixExtensionUIContext; private setAboveInputWidget; private clearAboveInputWidget; private selectDialog; private confirmDialog; private inputDialog; private editorDialog; private editorBackedDialog; private renderEditorBackedDialog; private dialogLine; private withDialogAutoDismiss; private showCustomUi; private cancelActiveCustomUi; private rejectActiveCustomUi; private finishActiveCustomUi; private activeCustomUiForActiveScope; private isScopeActive; private scopedMenuController; private activeScopeKey; private normalizeScopeKey; private scopedWidgetKey; private unscopedWidgetKey; private invalidateWidget; }