import type { UIMessage } from "ai"; import { fileToPart } from "./attachments.js"; /** The message shape the composer commits — mirrors useVendoThread.sendMessage. The explicit `parts` form is only for a turn carrying agent grounding, which needs a marked part the `text`/`files` shorthand cannot express. */ type OutgoingMessage = { text: string; files?: Awaited>[]; } | { parts: UIMessage["parts"]; }; /** One attachment's eager-read lifecycle (drives the chip ring). */ type AttachmentRead = { status: "reading" | "ready" | "error"; /** 0..1 read progress; meaningful while `reading`. */ progress: number; part?: Awaited>; }; /** Drag-drop attach: only reacts to drags that actually carry files (text selections dragged across the composer must not flash the drop zone). Exported for the thread-level drop surface. */ export declare const dragHasFiles: (event: React.DragEvent) => boolean; /** All composer state and send/queue mechanics, lifted to the thread level so the draft (and queued slot) survive the landing ↔ transcript flip. The Composer component below is the matching presentation. */ export declare function useComposer({ busy, sendMessage, steer }: { busy: boolean; sendMessage: (message: OutgoingMessage) => unknown; /** Offer words to the turn in flight; answers whether they landed. Absent for surfaces whose transport cannot steer (a scripted replay). */ steer?: (text: string) => Promise; }): { draft: string; setDraft: import("react").Dispatch>; files: File[]; setFiles: import("react").Dispatch>; dragDepth: number; setDragDepth: import("react").Dispatch>; attachmentPreviews: Map; attachmentReads: Map; retryRead: (file: File) => void; dockOpen: boolean; setDockOpen: import("react").Dispatch>; dockButtonRef: import("react").RefObject; queued: { text: string; files: File[]; context?: string; landed?: true; } | null; setQueued: import("react").Dispatch>; attachError: string | undefined; fileRef: import("react").RefObject; textareaRef: import("react").RefObject; send: (override?: string) => void; }; export type ComposerApi = ReturnType; export interface ComposerProps { composer: ComposerApi; busy: boolean; /** The live transport status + error for the sr-only announcement span. */ status: string; errorMessage?: string; onStop: () => void; onVoice?: (() => void) | undefined; /** The thread's jump-to-latest pill (.fl-newbar). Rendered inside the dock * anchor, which is the box it floats above. */ jumpBar?: import("react").ReactNode; } /** The message composer: attachments, drag-drop, queueing, dock. */ export declare function Composer({ composer, busy, status, errorMessage, onStop, onVoice, jumpBar }: ComposerProps): import("react").JSX.Element; export {};