AI

Chat

A complete AI chat: thread that follows the stream, bubbles or document-style answers, reasoning, sources and message actions, composed from the AI components.
import { ChatThread, Message, MessageAction } from "pleate/ai/chat";

Trip assistant

Pick a suggestion or type. Try Stop while it streams, and scroll up during a reply.

Trip assistant

Online

Where shall we go?

Messages

Bubbles grouped by sender with the tail on the last one, a read receipt, the typing bubble and the capsule composer.

Today 9:41
Is the 8:40 train to Sintra still running on Sundays?
Yes, it leaves Rossio every 20 minutes on weekends.
The 8:40 gets you to Sintra at 9:20, ten minutes before Pena Palace opens.
Perfect
Do I need to book the palace?

Props

ChatThread

Auto-scroll while at the bottom; a jump button otherwise. role=log.

threshold, latestLabel, contentClassName

Message role / variant

Who and how.

"user" | "assistant" | "system" / "bubble" | "document"

avatar / name / time / status

Header and delivery state.

actions / footer / continued

Hover actions, attachments or sources, grouping.

ReactNode / ReactNode / boolean

tail / receipt

Tight corner on the sender side (pass it on the last bubble of a group); a line like Read 9:42 under the bubble.

boolean / ReactNode

Accessibility

  • New messages are announced politely (role=log).
  • Actions stay reachable by keyboard (shown on focus).