/** * External-editor launch flows extracted from interactive-mode. * * `openExternalEditor` edits the current editor buffer in `$VISUAL`/`$EDITOR`; * `openEditorForPath` opens an arbitrary file (falling back to `vi`). Both stop * the TUI to release the terminal, spawn the editor, and restart the TUI with a * forced full re-render. They operate through a narrow `ExternalEditorHost` seam; * interactive-mode keeps thin delegating wrappers. */ import type { EditorComponent, TUI } from "@caupulican/pi-tui"; export interface ExternalEditorHost { readonly editor: EditorComponent; readonly ui: Pick; showWarning(message: string): void; } export interface ExternalEditorOptions { command: string; content: string; } export type ExternalEditorResult = { status: "complete"; content: string; } | { status: "failed"; }; /** * Edit text through the configured external editor while keeping all temporary * artifacts inside Pi's bounded user-level work directory. */ export declare function editInExternalEditor(options: ExternalEditorOptions): Promise; export declare function openExternalEditor(host: ExternalEditorHost): Promise; export declare function openEditorForPath(host: ExternalEditorHost, filePath: string): Promise; //# sourceMappingURL=external-editor.d.ts.map