import { type ReactNode } from 'react'; import type { AIUIDocument } from './AIUIDocument'; import type { AIUIHost } from './AIUIHost'; /** * A reply's generated UI as it shows in place of the reply's text: as wide as the reply, coming * in as it first shows while the agent writes it. UI that throws while it renders shows nothing, * and `onError` is told, such as to have the host show the reply's text. An app's component * that throws only leaves itself out. */ export declare const AIUIGenerated: ({ children, isStreaming, onError, }: { children: ReactNode; isStreaming: boolean; onError: (error: unknown) => void; }) => import("react/jsx-runtime").JSX.Element; /** * Shows the conversation's replies again whenever the host says what one of them shows changed, * such as once a renderer's runtime loads. */ export declare const useAIUIHostRefresh: (host: AIUIHost | undefined) => number; export type AIUIViewProps = { document: AIUIDocument; host: AIUIHost; /** The reply the document belongs to. */ messageId: string; }; /** * One reply's generated UI, for showing replies outside `AIConversation`. It shows nothing when * none of the host's renderers shows the document, and the reply's text should show instead: * `host.content(document, messageId) !== null` tells which, and `host.subscribe` when that may * have changed. Give the host the conversation's messages with `host.receive(messages)` as they * change. The counterpart of `AIUIView` in StreamChatAI. */ export declare const AIUIView: ({ document, host, messageId }: AIUIViewProps) => import("react/jsx-runtime").JSX.Element | null; //# sourceMappingURL=AIUIView.d.ts.map