Site skin

Chat message parts

Draws a Vercel AI SDK message's parts with the chat kit: Markdown text that completes while it streams, reasoning, tool calls in every state with approvals, sources, files, a plan, checkpoints and subagent runs. No dependency on the ai package.

Example

Checkpoint,
  1. Pass the locale to formatDateDone
  2. Deploy a previewIn progress
  3. Check the preview in GermanTo do

Input

{
  "branch": "fix/date-locale"
}

2 queued, sent when the answer is done

  1. Also check the French locale
  2. Then open a pull request

Installation

pnpm dlx shadcn@latest add @uiset/chat-message-parts

It lands in components/ui/chat-message-parts.tsx, with UISet’s root (uiset) and chat, chat-parts, chat-response. Wrap your app in <UISet> once, and every component takes its skin.

What it is

Chat message parts is one of UISet’s own parts, not a UI SDK component: it’s built from UI SDK’s behaviors and components, so it takes the keyboard, focus, screen readers and agents from them, and every skin styles it.

  • Styles in five skins, from CSS variables you can override: Base in light and dark, the others in their one scheme.
  • Text at 4.5:1 contrast and control edges and focus rings at 3:1, in every skin and theme, checked with axe in tests.
  • Named for agents, so an agent can find it (see Agents below).

Its props, its parts and how to wire it to your data are in its section of the App frame and data display guide.

Agents

UI SDK’s agent bridge finds this component by its accessible name: give it a visible label or an aria-label, and an agent can read its state and call its actions without screenshots. Building with AI agents shows how to connect one.

Turn on Agent view above the example to see what an agent reads from it, as you use it, with its agent-check score and every action it offers, which you can run from there.