import type { LatencyLog } from "../types"; interface Props { latency: LatencyLog | null; } const FIELDS: { key: keyof LatencyLog; label: string }[] = [ { key: "t_sensing", label: "Sensing" }, { key: "t_intent", label: "Intent" }, { key: "t_retrieval", label: "Retrieval" }, { key: "t_generation", label: "Generation" }, { key: "t_total", label: "Total" }, ]; export function LatencyMetrics({ latency }: Props) { if (!latency) return

No turn yet

; return (
Latency
{FIELDS.map(({ key, label }) => (
{label} {(latency[key] ?? 0).toFixed(3)}s
))}
); }