import type { LocalMessage, MessageResponse } from 'stream-chat'; import type { AIMessage } from './types'; /** What the adapter reads of a message: a `LocalMessage` or a `MessageResponse` will do. */ type StreamMessage = Pick; export type FromStreamMessageOptions = { /** Whether the agent wrote it. Defaults to the message's `custom.ai_generated` field. */ isAssistant?: (message: M) => boolean; /** The whole of a reasoning step's thinking, when the app has it, such as from live updates. */ reasoningText?: (messageId: string, stepId: string) => string | undefined; }; /** * Adapts a Stream message for `AIConversation`: a reply is one with `custom.ai_generated: true`, * it is being written while `custom.generating: true`, its steps are its `ai_reasoning` and * `ai_tool_call` attachments, its images and files are its other attachments, and the UI the * agent wrote for it is its `custom.ai_ui` field. A person's message has no UI, whatever its * fields say. */ export declare const fromStreamMessage: (message: M, { isAssistant, reasoningText }?: FromStreamMessageOptions) => AIMessage; export {}; //# sourceMappingURL=fromStreamMessage.d.ts.map