Captain UI

Captain sidebar

A sidebar for talking to one Captain: missions, a queue of questions, history and spend, for an agent that runs swarms.

npx shadcn@latest add https://captain-sidebar.vercel.app/r/captain-sidebar.json

Usage

import { CaptainSidebar } from "@/components/captain/captain-sidebar"

<CaptainSidebar captain={captain} missions={missions} queue={queue} budget={{ spent: 8.4, cap: 50 }} />

Props

PropTypeDefaultWhat it does
captainCaptainState and the one line the Captain is saying.
missionsMission[]Swarms with their agents.
queueQueueItem[]Questions waiting on you.
budget{ spent, cap }Spend so far.
onResolve(item, answer) => voidAnswers from the queue.

Keyboard

⌘J
Open the Captain
⌘K
Search
⌘\
Collapse

Accessibility

  • Landmark nav with labelled sections.
  • Live region for the Captain's line.
  • Holds 60fps with 1,000 agents.