import type { Snippet } from "svelte"; import type { HTMLAttributes } from "svelte/elements"; import { type ChatMessageRole, type ChatMessageStatus } from "./ChatMessage.svelte"; export type StreamingMessageEvent = { type: "message.delta"; messageId?: string; delta: string; } | { type: "message.completed"; messageId?: string; } | { type: "reasoning.delta"; messageId?: string; delta: string; } | { type: "reasoning.completed"; messageId?: string; } | { type: "tool.started"; toolCallId: string; toolName: string; messageId?: string; } | { type: "tool.completed"; toolCallId: string; status: "success" | "error"; toolName?: string; messageId?: string; } | { type: "permission.requested"; toolCallId: string; choices: string[]; messageId?: string; } | { type: "checkpoint.requested"; checkpointId: string; label: string; messageId?: string; }; export type StreamingMessageMode = "live" | "passive"; /** * Simple data-driven event shape (cross-framework parity with React/Vue * ports). Distinguished from the rich event-stream shape by the absence of a * `type` discriminant. */ export type StreamingMessageSimpleEvent = { id: string; label: string; text?: string; status?: ChatMessageStatus; }; type StreamingMessageProps = Omit, "class" | "children" | "role"> & { role?: ChatMessageRole; status?: ChatMessageStatus; streamId?: string; initialEvents?: StreamingMessageEvent[]; events?: StreamingMessageEvent[] | StreamingMessageSimpleEvent[]; finalContent?: string; /** * Plain message body (cross-framework parity with React/Vue ports). When * provided, it is used as the rendered content (equivalent to * `finalContent`). The canonical event-stream API still works. */ text?: string; mode?: StreamingMessageMode; placeholder?: string; showTrail?: boolean; class?: string; footer?: Snippet; actions?: Snippet; }; declare const StreamingMessage: import("svelte").Component; type StreamingMessage = ReturnType; export default StreamingMessage; //# sourceMappingURL=StreamingMessage.svelte.d.ts.map