About AI Chat Log
AI Chat Log is a specialized component for displaying conversations with AI assistants. It provides components optimized for AI chat experiences, including loading states, action cards, and source citations.Components
The AI Chat Log package includes:- AIChatLog - Container for AI chat messages
- AIChatMessage - Individual AI message
- AIChatMessageBody - Message content
- AIChatMessageAuthor - Author name/avatar
- AIChatMessageActionGroup - Action buttons
- AIChatMessageActionCard - Suggested actions
- AIChatMessageLoading - Loading state indicator
- AIChatMessageSource - Source citation
- AIChatMessageSourceLink - Link to source
- AIChatEvent - System event message
- AIChatLogger - State management component
- useAIChatLogger - Hook for chat state
Installation
Usage
Props
AIChatLog
AIChatMessage
AIChatMessageBody
AIChatMessageAuthor
AIChatMessageLoading
AIChatMessageActionCard
AIChatMessageSource
useAIChatLogger Hook
Manages AI chat message state:Size Variants
Thesize prop on AIChatLog adjusts typography for different contexts:
default- Standard size for embedded chatfullscreen- Larger size for dedicated chat pages
Accessibility
- Uses
role="log"for proper screen reader announcements - Messages have semantic list structure
- Author labels are required for context
- Loading states are announced to assistive technology
- Source links are properly labeled
Related components
- Chat Log - For human-to-human chat
- Chat Composer - For composing messages