import { useEffect, useRef } from 'react' import MessageBubble from './MessageBubble' import ThinkingIndicator from './ThinkingIndicator' export default function ChatPanel({ messages, isLoading, onReplay, character }) { const bottomRef = useRef(null) const name = character?.name || 'AI' const image = character?.image || null useEffect(() => { bottomRef.current?.scrollIntoView({ behavior: 'smooth' }) }, [messages, isLoading]) if (messages.length === 0 && !isLoading) { return (
Type a message or press the mic to talk