Interactive chat component that displays messages between multiple participants with support for user input, message history, and various chat scenarios.
<Chat messages={[]} participants={participants} onMessage={handleMessage} />
<Chat
messages={[
{ id: '1', from: 'USER', content: 'Hello!', date: new Date(), isComplete: true },
{ id: '2', from: 'ASSISTANT', content: 'Hi! How can I help?', date: new Date(), isComplete: true }
]}
participants={participants}
onMessage={handleMessage}
onReset={handleReset}
/>
<Chat
messages={multiParticipantMessages}
participants={[
{ name: 'USER', fullname: 'You', isMe: true, color: '#3b82f6' },
{ name: 'ASSISTANT_1', fullname: 'AI Assistant', color: '#10b981' },
{ name: 'ASSISTANT_2', fullname: 'Code Helper', color: '#f59e0b' }
]}
onMessage={handleMessage}
placeholderMessageContent="Ask multiple assistants..."
/>
<Chat
messages={[
{ id: '1', from: 'USER', content: 'Question?', date: new Date(), isComplete: true },
{ id: '2', from: 'ASSISTANT', content: 'Thinking...', date: new Date(), isComplete: false }
]}
participants={participants}
onMessage={handleMessage}
/>
messages
participants
onMessage
onReset
placeholderMessageContent
"Write a message"
defaultMessage
children
className
style
isVoiceRecognitionButtonShown
false
voiceLanguage
"en-US"
isVoiceCalling
false