Agents
Conversation
The scrolling thread of an agent chat, built from Message: it follows new turns until the reader scrolls up, then offers a Jump to latest pill, and shows the agent's thinking indicator while a reply is on its way.
Group: Agents. Exports: Conversation. Halaska addition with no shadcn/ui equivalent.
Usage
import { Conversation } from "./halaska-kit";
Conversation props
messages{ id: string, role: "user" | "agent" | "system", text?: string, time?: string, status?: string, sources?: object[], actions?: object[], streaming?: boolean, name?: string }[](default CONV_MESSAGES): Turns in order; every field is passed on to Message (default: CONV_MESSAGES)renderMessage(message: object, index: number) => node: Replaces the default Message for a turnchildrennode: Turns rendered instead of `messages`, for fully custom contentautoScrollboolean(default true): Follow new content while the reader is at the bottom; scrolling up pauses it and shows a jump pill (default: true)jumpLabelstring(default "Jump to latest"): Text of the jump pill (default: "Jump to latest")typingboolean(default false): Shows the agent's thinking indicator after the last turn (default: false)typingLabelstring(default "Thinking"): Label beside the thinking dots (default: "Thinking")heightnumber(default 420): Height of the log in px (default: 420)frameboolean(default true): Draw a hairline border and rounded corners around the log (default: true)emptyStatenode: Shown when there are no turns; the default invites the first questioncompactboolean(default false): Passed on to every Message (default: false)
Accessibility
- The thread is a focusable region with the log role and aria-live polite, so new turns are announced without interrupting.
- While the agent is typing the log is marked aria-busy and the indicator carries the status role.
- Jump to latest is a real button; the reader's scroll position is never moved while they are reading above the end.
- Every turn keeps the Message accessibility behaviour, including hover and focus actions.
Known gaps
- No virtualisation: very long threads render every turn.
- No day separators between turns; pass a system message for that.
Used in
canvas screen, Model & context
Halaska UI · Components · Patterns · Screens · Install