import type { StateResponse } from "../api"; interface Props { state: StateResponse | null; connected: boolean; generatedAt: string | null; } const CHIPS: Array<{ key: keyof StateResponse["summary"]; label: string; cls: string }> = [ { key: "active", label: "Active", cls: "active" }, { key: "waiting", label: "Awaiting human", cls: "waiting" }, { key: "parked", label: "Parked", cls: "parked" }, { key: "open_questions", label: "Open questions", cls: "open" }, { key: "total", label: "Total", cls: "total" }, ]; // Top status bar: summary chips, a connection/health dot, and the snapshot clock. export function TopBar({ state, connected, generatedAt }: Props) { const summary = state?.summary; return (
agent-team pipeline
{CHIPS.map((c) => (
{summary ? summary[c.key] : "–"} {c.label}
))}
{generatedAt ?? "—"}
); }