import type { MessageType, IAction, LeadsConfig, HumanInputFormData } from '@/widget/types'; import type { BranchPager } from '@/widget/controllers/messageVersions'; import type { DuiArtifactAccess } from '@/widget/components/dynamic-ui/types'; type MessageListProps = { messages: MessageType[]; deploymentId: string; chatId: string; apiHost?: string; loading: boolean; /** Re-answer the assistant turn at this index. Omitted where unsupported. */ onRegenerate?: (index: number) => void; fontSize?: number; renderHTML?: boolean; showAgentMessages?: boolean; sourceDocsTitle?: string; userMessage?: any; botMessage?: any; feedback?: any; dateTimeToggle?: any; textInput?: any; chatFeedbackStatus: boolean; leadsConfig?: LeadsConfig; isLeadSaved: boolean; setIsLeadSaved: (v: boolean) => void; setLeadEmail: (v: string) => void; isTTSEnabled: boolean; isTTSLoading: Record; isTTSPlaying: Record; handleTTSClick: (messageId: string, messageText: string) => void; handleTTSStop: (messageId: string) => void; handleActionClick: (elem: any, action: IAction | undefined | null) => void; handleHumanInputSubmit?: (formData: HumanInputFormData, action: IAction | undefined) => void; handleSourceDocumentsClick: (src: any) => void; /** Sends an interactive Dynamic UI answer as a follow-up turn. Only the newest message gets it. */ onRespond?: (text: string) => void; /** * Artifact access for `artifact-ref` blocks. Unlike `onRespond` this goes to every message: * an artifact from an earlier turn is still the visitor's and still openable, so a replayed * transcript stays useful rather than degrading to a list of names. */ artifacts?: DuiArtifactAccess; /** Replace the user turn at this index and answer it again. Omitted where editing is unsupported. */ onEditMessage?: (index: number, content: string) => void; /** Version pager state per transcript index, for turns that have been edited. */ branchPagerByIndex?: Record; /** Page to another version of the turn at this index. */ onSwitchBranch?: (index: number, branchIndex: number) => void; /** True while a switch is in flight — the pager is inert until it settles. */ branchSwitchDisabled?: boolean; /** * Which rows the host's `scope` leaves on screen. The full transcript is still passed in and * still indexed, because `onRegenerate`, `onEditMessage` and `onSwitchBranch` hand these * positions back and they are resolved against the whole array. */ isVisible?: (index: number) => boolean; /** Set when `scope` names something this conversation does not have. */ scopeUnavailable?: string; }; export declare const MessageList: (props: MessageListProps) => import("solid-js").JSX.Element; export {};