Skip to main content
The Chat component is the core of Osmium, providing a complete chat interface optimized for AI conversations. It combines a message list and message input with intelligent scroll management and UX features similar to ChatGPT and Grok.

Installation

Install the Chat component using the shadcn CLI:

Usage

Props

ChatStatus
required
The current status of the chat. Controls the input state and loading indicators.
UIMessage[]
required
Array of chat messages to display. Uses the standard UI message format from AI SDK.
(message: string) => void
required
Callback function called when the user sends a message. Receives the message content as a string.
() => void
required
Callback function called when the user wants to stop the AI response generation.