import type { CommandRegistry } from "../../app/commands/registry.js"; import type { ClipboardPort } from "../../app/ports/clipboard-port.js"; import { type ClipboardImageCapture } from "../../attachments/clipboard-image.js"; import type { ActionId } from "../../ui-core/actions/action-id.js"; import { type CompletionMenu } from "../../ui-core/composer/completion.js"; import { type PastePlaceholderEntry } from "../../ui-core/composer/paste-placeholder.js"; import type { EditorSpan } from "./editor-view.js"; import { type EditorState } from "./editor-model.js"; export interface ComposerSnapshot { readonly skillSpans: readonly EditorSpan[]; readonly state: EditorState; readonly menu: CompletionMenu; readonly active: number; readonly pastes: readonly PastePlaceholderEntry[]; readonly acceptedSlash: string | undefined; } export interface ComposerControllerDeps { readonly commands: CommandRegistry; readonly clipboard: ClipboardPort; readonly baseDir?: string | undefined; readonly onSubmit: (prompt: string) => void; readonly onToast: (text: string) => void; readonly onScrollChat: (delta: number) => void; readonly onJumpTop: () => void; readonly captureClipboardImage?: (() => ClipboardImageCapture) | undefined; readonly now?: (() => number) | undefined; } export declare class ComposerController { private readonly deps; private snapshot; private readonly listeners; private readonly history; private readonly pastes; private arrowBurst; private textWidth; constructor(deps: ComposerControllerDeps); getSnapshot: () => ComposerSnapshot; subscribe: (listener: () => void) => (() => void); setTextWidth(width: number): void; get text(): string; expand(value: string): string; menuOpen(): boolean; menuItemCount(): number; insertText(text: string): void; insertToken(token: string): void; paste(text: string): void; private insertAttachmentText; private pasteClipboardImage; setText(text: string): void; clear(): void; handleAction(action: ActionId): boolean; handleChord(chord: string): boolean; private handleMenuChord; private walkHistory; private submit; private cut; private resolveMenu; private commit; private publish; }