import { type RefObject } from "react"; import type { MessageAttachment } from "./types"; import type { PendingElicitationRequest } from "@/client/types/elicitation"; import type { ElicitResult } from "@modelcontextprotocol/sdk/types.js"; interface Message { id: string; role: "user" | "assistant"; content: string | Array<{ index: number; type: string; text: string; }>; timestamp: number; attachments?: MessageAttachment[]; parts?: Array<{ type: "text" | "tool-invocation"; text?: string; toolInvocation?: { toolName: string; args: Record; result?: any; state?: "pending" | "streaming" | "result" | "error"; partialArgs?: Record; }; }>; toolCalls?: Array<{ toolName: string; args: Record; result?: any; }>; } interface MessageListProps { messages: Message[]; isLoading: boolean; serverId?: string; readResource?: (uri: string) => Promise; tools?: any[]; sendMessage?: (message: string, attachments?: MessageAttachment[]) => Promise; /** When provided, passed to widget renderers to avoid useMcpClient() context lookup. */ serverBaseUrl?: string; /** Pending elicitation requests to render inline in the chat thread. */ pendingElicitationRequests?: PendingElicitationRequest[]; /** Handler called when the user accepts or declines an elicitation. */ onApproveElicitation?: (requestId: string, result: ElicitResult) => void; /** Handler called when the user cancels an elicitation. */ onRejectElicitation?: (requestId: string, error?: string) => void; /** Scroll container element (the overflow-y parent). Enables scroll-to-bottom UX. */ scrollContainerRef?: RefObject; } export declare const MessageList: import("react").MemoExoticComponent<({ messages, isLoading, serverId, readResource, tools, sendMessage, serverBaseUrl, pendingElicitationRequests, onApproveElicitation, onRejectElicitation, scrollContainerRef, }: MessageListProps) => import("react/jsx-runtime").JSX.Element>; export {}; //# sourceMappingURL=MessageList.d.ts.map