/** * MetricsStrip — cost, latency, tokens, and model, styled like the marginalia * on an accountant's ledger. Each is a small block with an eyebrow label and * a display-font number, separated by thin ruled dividers. * * The cost gets a wax-stamp treatment — a small angled disc behind the number. */ import type { ExtractionMetrics } from "@/types"; interface Props { metrics: ExtractionMetrics; } export function MetricsStrip({ metrics }: Props) { return (
); } /* ------------------------------------------------------------------------ */ function Cell({ label, value, small, mono, stamp, }: { label: string; value: string; small?: boolean; mono?: boolean; stamp?: boolean; }) { return (

{label}

{stamp && } {value}

); } function StampBg() { return ( ); } /* -- formatters ----------------------------------------------------------- */ function formatCost(usd: number): string { if (usd < 0.001) return `$${(usd * 1000).toFixed(2)}m`; // in mills return `$${usd.toFixed(4)}`; } function formatLatency(ms: number): string { if (ms < 1000) return `${Math.round(ms)}ms`; return `${(ms / 1000).toFixed(2)}s`; }