import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; export type ListEditorItemKind = "suggestion" | "selected" | "action"; export interface ListEditorItem { id: string; kind: ListEditorItemKind; label: string; description?: string; value: string; } export interface ListEditorCustomAction { id: string; label: string; } export interface ListEditorOptions { title: string; items: ListEditorItem[]; filterQuery?: string; enableFilter?: boolean; customActions?: ListEditorCustomAction[]; pageSize?: number; /** Force the simple ctx.ui.select fallback even in TUI mode. */ forceFallback?: boolean; } export type ListEditorAction = { kind: "done"; paths: string[]; } | { kind: "back"; } | { kind: "filter"; query: string; paths: string[]; } | { kind: "custom"; id: string; paths: string[]; }; /** Truncate a path so the filename stays visible: head + … + filename. * If the filename alone is too long, keep its tail (extension visible). * User decision: a truncated row must still be identifiable. */ export declare function truncateMiddle(text: string, maxWidth: number): string; export declare function runListEditor(ctx: ExtensionContext, options: ListEditorOptions): Promise;