/** * [WHO]: * [FROM]: * [TO]: Consumed by modes/interactive/components/index.ts * [HERE]: modes/interactive/components/custom-editor.ts - */ import { Editor, type EditorOptions, type EditorTheme, type TUI } from "@catui/tui"; import type { AppAction, KeybindingsManager } from "../../../core/platform/keybindings.js"; import type { Theme } from "../../../core/theme-contract.js"; /** * Custom editor that handles app-level keybindings for coding-agent. */ export declare class CustomEditor extends Editor { private keybindings; actionHandlers: Map void>; onEscape?: () => void; onCtrlD?: () => void; onPasteImage?: () => void; /** Handler for extension-registered shortcuts. Returns true if handled. */ onExtensionShortcut?: (data: string) => boolean; /** Handler for attachment navigation (arrow keys, delete). Returns true if handled. */ onAttachmentKey?: (data: string) => boolean; /** Slash command highlight function. Exists on Editor but node_modules .d.ts is stale. */ highlightInput: ((text: string) => string) | null; constructor(tui: TUI, theme: EditorTheme, keybindings: KeybindingsManager, options?: EditorOptions); /** * Enable slash command highlighting in the input box. * @param getCommandNames returns the current set of valid command names (without "/") * @param theme the interactive mode theme for color resolution */ enableSlashHighlight(getCommandNames: () => Set, theme: Theme): void; /** * Register a handler for an app action. */ onAction(action: AppAction, handler: () => void): void; handleInput(data: string): void; }