import { cn } from "@/lib/utils"; import { Check, Circle, Loader2 } from "lucide-react"; import type { TaskChatPlan, TaskChatPlanEntryStatus } from "./task-chat-model"; const STATUS_ICON: Record = { completed: { Icon: Check, spin: false, tone: "text-(--status-task-icon-done)" }, in_progress: { Icon: Loader2, spin: true, tone: "text-(--status-agent-running)" }, pending: { Icon: Circle, spin: false, tone: "text-muted-foreground" }, }; const PRIORITY_TONE = { high: "text-destructive", medium: "text-(--status-agent-paused)", low: "text-muted-foreground", } as const; /** * Structured plan/todo viewer (ACP Plan / PlanEntry). Used both by the harness * "plan-todo" state and by the properties-pane Plans tab. Renders a live * checklist with per-entry status and a revision label; entries stagger in. */ export function TaskChatPlanView({ plan }: { plan: TaskChatPlan }) { const done = plan.entries.filter((e) => e.status === "completed").length; return (
Plan ยท rev {plan.revision} {done}/{plan.entries.length} done
); }