System
Atlas joined the thread
A chat or agent thread: a role="log" that follows new messages while the reader is at the end, stops when they scroll up and shows a "new below" pill that jumps back (smooth unless reduced motion), keeps a streaming message in view, loads older messages above without moving the view, and server renders. ConversationMessage is an article named by its author, with avatar, relative time and data-from (user, assistant, agent, system, tool); ConversationComposer composes Textarea and Button. Agents read messages and call jumpToLatest.
lucide-reactA chat or agent thread: messages in a log that follows the newest one, a pill when new ones arrive while the reader is scrolled up, and a composer.
Takes PartProps, ConversationOptions.
Takes ComponentProps.
| Prop | Type | Default |
|---|---|---|
labels | Partial<Pick<ConversationLabels, "newBelow" | "jumpToLatest">> | – |
children | ReactNode | – |
Also takes ComponentProps except children.
Takes ComponentProps.
| Prop | Type | Default |
|---|---|---|
labelrequiredNames the log, for screen readers and agents. | string | – |
labels | Partial<ConversationLabels> | – |
composerA `ConversationComposer`, below the log. | ReactNode | – |
emptyShown in the log while it has no messages. | ReactNode | – |
children`ConversationMessage`s, oldest first. | ReactNode | – |
Also takes PartProps except children, ConversationOptions except children.
| Prop | Type | Default |
|---|---|---|
fromrequiredWho sent it; styles it and becomes `data-from`. | "user" | "assistant" | "agent" | "system" | "tool" | – |
authorThe sender's name, shown above the message and naming it. | ReactNode | – |
avatarAn `Avatar` or `AgentAvatar`, beside the message. | ReactNode | – |
timeWhen it was sent, shown as a `RelativeTime`. | Instant | – |
nowPass one `useNow()` per screen to every message's `now`. | Instant | – |
locale | string | – |
streamingStill arriving: `aria-busy`, so screen readers wait for the whole message. | boolean | – |
actionsButtons under the message, like Copy or Retry. | ReactNode | – |
messageIdIdentifies it to agents reading the log. | string | – |
labelsA screen-reader name per role, used when there is no `author`. | Partial<ConversationMessageLabels> | – |
Also takes <article> attributes except role.
| Prop | Type | Default |
|---|---|---|
onSendrequiredSends the trimmed text. The field empties once it returns, or once a returned Promise resolves; return `false` (or resolve to it) to keep the text, like after a failed send. | (text: string) => unknown | – |
labels | Partial<ConversationComposerLabels> | – |
placeholder | string | – |
disabled | boolean | – |
submitShortcut`"enter"` (default): Enter sends and Shift+Enter starts a line. `"mod+enter"`: Cmd/Ctrl+Enter sends. | "enter" | "mod+enter" | "enter" |
controllerReads and writes the field from outside, like a suggestion chip that fills it. | InputController | – |
actionsMore controls beside Send, like an attach button. | ReactNode | – |
className | string | – |
conversationdescribeMessageConversationContextconversationLabelsconversationMessageLabelsuseConversationconversationComposerLabelstype ConversationMessageItemtype ConversationOptionstype ConversationApitype ConversationLabelstype ConversationMessageLabelstype ConversationMessagePropstype ConversationPropstype ConversationRoletype ConversationRootPropstype ConversationComposerLabelstype ConversationComposerPropsAgents read the messages as the thread's items (author: text), call jumpToLatest and loadOlder, and send by setting the Message field and pressing Send.
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.