import type { MultiModalContent } from '@lasercat/homogenaize'; import { type ConversationEnvironment } from './environment'; import type { Conversation, JSONValue, Message, TokenUsage } from './types'; /** * Checks if a message is currently streaming (has the streaming metadata flag). */ export declare function isStreamingMessage(message: Message): boolean; /** * Gets the currently streaming message from a conversation, if any. */ export declare function getStreamingMessage(conversation: Conversation): Message | undefined; /** * Creates a pending/streaming message placeholder and appends it to the conversation. * Returns both the updated conversation and the ID of the new streaming message. */ export declare function appendStreamingMessage(conversation: Conversation, role: 'assistant' | 'user', metadata?: Record, environment?: Partial): { conversation: Conversation; messageId: string; }; /** * Updates the content of a streaming message. * This replaces the existing content (use for accumulating streamed tokens). */ export declare function updateStreamingMessage(conversation: Conversation, messageId: string, content: string | MultiModalContent[], environment?: Partial): Conversation; /** * Marks a streaming message as complete, removing the streaming flag. * Optionally adds token usage and additional metadata. */ export declare function finalizeStreamingMessage(conversation: Conversation, messageId: string, options?: { tokenUsage?: TokenUsage; metadata?: Record; }, environment?: Partial): Conversation; /** * Cancels a streaming message by removing it from the conversation. */ export declare function cancelStreamingMessage(conversation: Conversation, messageId: string, environment?: Partial): Conversation; //# sourceMappingURL=streaming.d.ts.map