import { cn } from "@/lib/utils"; import { Gauge } from "lucide-react"; import type { TaskChatUsageItem } from "./task-chat-model"; /** * Second-tier live token/cost readout (ACP UsageUpdate). Concrete progress — * context fill %, tokens, and cost — rather than an indeterminate spinner. * Recedes to metadata weight so it never competes with message content. */ export function TaskChatUsageReadout({ item }: { item: TaskChatUsageItem }) { const { used, size, inputTokens, outputTokens, costUsd } = item.usage; const contextWindowSize = typeof size === "number" && size > 0 ? size : null; const pct = contextWindowSize ? Math.min(100, Math.round((used / contextWindowSize) * 100)) : 0; return (