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 (
Type a message or press the mic to talk