/** * Draft-level composer actions that need more than a keystroke: cut (copy then * clear) and "show every slash command". Kept out of the editor component so * the clipboard call site stays explicit and reviewable. */ import type { ClipboardPort } from "../../app/ports/clipboard-port.js"; export interface DraftEditor { readonly plainText: string; setText(value: string): void; gotoBufferEnd(): void; } export interface CutDraftInput { readonly editor: DraftEditor; readonly clipboard: ClipboardPort; /** Expands paste placeholders so the clipboard gets the real text. */ readonly expand: (text: string) => string; readonly clearDraft: () => void; readonly focus: () => void; } export type CutDraftOutcome = "empty" | "cut" | "cleared-copy-failed"; /** * Ctrl+X. The draft is cleared whether or not the copy succeeded, so the * key never silently does nothing; the caller reports which happened. */ export declare function cutDraft(input: CutDraftInput): Promise; export declare function cutDraftMessage(outcome: CutDraftOutcome): string; /** * Put the composer into the state typing "/" produces, so the click target in * the status row and the keystroke show the identical command list. */ export declare function primeCommandMenu(editor: DraftEditor): void;