Open History to see the last commit
1import { View } from "react-native";
2
3import { cn } from "../../lib/cn";
4import type { SubagentRowTone } from "./threadAgentsPresentation";
5
6const TONE_CLASS = {
7 working: "bg-adaptive-sky-600-400",
8 completed: "bg-adaptive-emerald-600-400",
9 failed: "bg-adaptive-rose-600-400",
10 stopped: "bg-foreground-muted",
11} as const satisfies Record<SubagentRowTone, string>;
12
13export function SubagentStatusDot({
14 tone,
15 placement = "inline",
16}: {
17 readonly tone: SubagentRowTone;
18 readonly placement?: "inline" | "provider" | "sheet";
19}) {
20 return (
21 <View
22 className={cn(
23 "shrink-0 rounded-full",
24 placement === "sheet" ? "h-2 w-2" : "h-1.5 w-1.5",
25 placement === "provider" && "absolute bottom-0.5 right-0.5",
26 TONE_CLASS[tone],
27 )}
28 />
29 );
30}