import type { ImageContent } from "@oh-my-pi/pi-ai"; import type { CustomEditor } from "@oh-my-pi/pi-tui/prompt/custom-editor"; import type { ParsedSlashCommand, TuiSlashCommandRuntime } from "../types.js"; /** Clear only text still owned by this submission, never a newer detached draft. */ export declare function clearSubmittedText(runtime: TuiSlashCommandRuntime): void; /** * Return a submission that already left the editor without replacing a draft * typed while it awaited dispatch: its attachments append after the newer * draft's, its `[Image #N]` markers shift to match, and its text goes first. */ export declare function restoreDetachedDraft(editor: CustomEditor, text: string, images?: ImageContent[], imageLinks?: (string | undefined)[]): void; /** A text-only command gives a draft with images back instead of running without them; returns whether it refused. */ export declare function refuseImages(command: ParsedSlashCommand, runtime: TuiSlashCommandRuntime): boolean; /** * Run a command that takes its whole draft, images included. An unsent draft gets * its attachments back, and with `restoreText` its text too; a `run` that throws on * a detached draft is left to the caller, which already took the draft out. */ export declare function runWithDetachedDraft(command: ParsedSlashCommand, runtime: TuiSlashCommandRuntime, run: () => Promise, options?: { restoreText?: boolean; }): Promise;