import { useEffect, useRef } from 'react' import MessageBubble from './MessageBubble' import ThinkingIndicator from './ThinkingIndicator' export default function ChatPanel({ messages, isLoading, onReplay }) { const bottomRef = useRef(null) useEffect(() => { bottomRef.current?.scrollIntoView({ behavior: 'smooth' }) }, [messages, isLoading]) if (messages.length === 0 && !isLoading) { return (
AI

Hi, I'm Aria

Type a message or press the mic to talk

) } return (
{messages.map((msg) => ( ))} {isLoading && }
) }