Agent timeline layout (Pro)
ProIncluded in $99A long running agent's thread as a timeline, with honest gaps between steps and a composer that steers without stopping the run.
On this page
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { AgentTimelineLayout } from "@/components/ui/chatcn/pro/agent-timeline-layout"
<AgentTimelineLayout
title="Helpdesk migration"
events={events}
status={run.status}
startedAt={run.startedAt}
onSend={steer}
onStop={run.stop}
/>Agents that run for hours do not fit a chat transcript. Here each step sits on a rail with its time and a mark for its kind (an update, a tool, a wait for someone, a human reply, a milestone, an error) in the kit's status colors. Time is honest: when more than gapMs passes between two steps, the rail turns dashed and says how long, so a run that took a night reads like one; a new day gets a label. While the run is going, the latest step shows as in progress and the header counts how long it has been running. Waits can carry actions inline, such as Approve. The composer always sends, so steering never stops the run; Stop is its own button in the header.
Examples
States
Props
| Prop | Type | Notes |
|---|---|---|
events | TimelineEvent[] | { id, at, kind, title, detail?, state?, actions? }; kind is "update" | "tool" | "wait" | "human" | "milestone" | "error" |
title | ReactNode | The run's name |
status | LayoutChatStatus | streaming or submitted while the agent works |
startedAt | Date | string | number | For the elapsed time in the header |
gapMs | number | Longer gaps show as dashed stretches. Default 20 minutes |
onSend, onStop | (text) => void, () => void | Steer, and stop the run |
now, timeZone, locale | A fixed clock and formatting, for previews | |
value, onValueChange | string | The draft, controlled or not |
labels | Partial<AgentTimelineLabels> | Every string, for translation |
Keyboard
| Key | Action |
|---|---|
| Enter, Shift Enter | Send a steer, new line |
| Tab | Reach actions on a waiting step, then Stop run |
Accessibility
- The timeline is an ordered list; each step's time is a time element with the full date.
- Status is shown by color, an icon and the words in the step, never color alone.
- Gaps are written out (3 h later), not only drawn.
Motion
A new step enters with a short rise at the bottom of the list, which stays scrolled to the latest step unless the reader has scrolled up. Under reduced motion steps appear in place.