import useLLM from "@react-llm/headless"; import { useEffect, useRef } from "react"; function MessageList({ screenName = "endlessbox5", assistantScreenName = "SmartestChild", }) { const scrollRef = useRef(null); const { conversation, userRoleName } = useLLM(); const messages = conversation?.messages || []; const scrollToBottom = () => { if (scrollRef.current) { scrollRef.current.scrollIntoView(); } }; useEffect(() => { scrollToBottom(); }, [conversation, messages.length]); return (