Core components
ChatList
Displays a scrollable list of chat messages with loading states and tool results.Array of messages from the AI SDK. Each message contains
id, role, content, and optional parts for tool invocations.Indicates if the AI is currently generating a response.
Shows a “Thinking…” indicator when a new message is being submitted.
Function to regenerate the last AI response. Signature:
(chatRequestOptions?: any) => Promise<string | null | undefined>Callback to add tool execution results back to the conversation. Signature:
(args: { toolCallId: string; result: string }) => voidChatMessage
Renders individual chat messages with support for text content, tool invocations, and action buttons.Message object containing
id, role (“user” | “assistant”), content, and optional parts array for structured content.Whether this is the last message in the conversation. Controls visibility of regenerate button.
Indicates if the AI is currently generating content.
Function to regenerate this message.
Callback for tool execution results.
Messages with
role: "user" are styled differently and aligned to the right. Assistant messages include copy and regenerate buttons.ChatInput
Multi-line text input with submit button and microphone icon.Current input text value.
Callback when input text changes. Signature:
(text: string) => voidCallback when user submits the message.
Disables submit button when true.
ChatHeader
Top navigation bar with history, title, and new chat buttons.Callback when history button is pressed.
Callback when new chat button is pressed.
Title displayed in the center. Defaults to “New Chat” if not provided.
Feature components
SuggestionCards
Horizontal scrollable list of suggested prompts with tool logos.Callback when a suggestion is tapped. Receives the suggestion text as parameter. Signature:
(suggestion: string) => voidBuilt-in suggestions include Jupiter swap, Rainfi lending, Lulo deposits, and Jupiter staking prompts.
HistoryOverlay
Slide-in panel for browsing conversation history with search and delete functionality.Controls overlay visibility.
Callback when overlay is closed.
Callback when a conversation is selected. Signature:
(conversationId: string) => voidCallback when new chat button is pressed.
Callback when a chat is deleted. Signature:
(chatId: string) => voidArray of conversation metadata objects with
id, title, lastMessage, messageCount, and updatedAt timestamp.ID of the currently active chat for highlighting.
ToolManager
Displays tool invocation cards with execution buttons and results.Object containing
toolCallId, toolName, args, and optional result.Callback to add execution results. Signature:
(args: { toolCallId: string; result: string }) => voidToolManager automatically displays appropriate logos for DeFi protocols like Jupiter, Lulo, Rainfi, and DexScreener.
Type definitions
- Message
- ToolInvocation
- ChatMetadata
Related hooks
useChat
AI SDK React hook for chat functionality
useSolanaAgent
Hook for Solana agent and tool execution