Skip to content
Sign upGet access
MicrointeractionsAgent toastMenu

Agent toast (Pro)

ProIncluded in $99

One toast for a whole agent run, changing in place from queued to working to asking to done or failed.

ProTwo agents: each toast changes in place from queued to working to asking to done or failed, instead of stacking a toast per event.

Instead of a new toast per event, one toast follows the run. Queued, it is a single quiet line. Working, the step under the title edits itself and a hairline of progress runs along the bottom edge. When the agent needs you, the toast opens downward to ask, with the answer buttons right there, and its edge takes the amber of things waiting on you. Done folds it back to one line with a check and how long it took; failed does the same in red with a retry.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/agent-toast

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

tsx
import { AgentToast } from "@/components/ui/chatcn/pro/agent-toast"

<AgentToast
  title="Fix session expiry"
  status={run.status}
  detail={run.step}
  progress={run.progress}
  time={run.elapsed}
  question="Push 3 files and open a pull request?"
  onApprove={approve}
  onDeny={deny}
  onAction={openRun}
/>

Examples

Statuses

ProQueued, working with progress, waiting on you with a question, done with an action, and failed with a retry.

Props

PropTypeNotes
status"queued" | "working" | "needs-input" | "done" | "failed"
titlestringWhat the agent is doing
detailstringThe step while working, the result when finished
progressnumber0 to 1 while working
timestringElapsed or finished time, formatted
questionstringShown while it needs input
approveLabel / denyLabelstringDefault Approve and Deny
onApprove / onDeny() => void
onAction / actionLabel() => void / stringView when done, Retry when failed
onDismiss() => voidShows the close button

Accessibility

  • A polite role="status": each change of step is read once, not each tick of progress.
  • Status color always comes with the run check's shape or the question mark and the words Needs your input.

Motion

  • The question opens on grid-template-rows, 300 ms. Progress is a heavy spring on scaleX.
  • Asking lifts the toast 3 px once; nothing repeats or pulses. Reduced motion keeps the fades only.