import type { HistoryRecord } from "../hooks/useMetrics"; interface Props { history: HistoryRecord[]; } export default function RequestsTable({ history }: Props) { const sorted = [...history].reverse(); return (

Recent Requests

Last {sorted.length} classification{sorted.length !== 1 ? "s" : ""}

{sorted.length === 0 ? ( ) : ( sorted.slice(0, 50).map((r, i) => ( )) )}
Timestamp Input Verdict Confidence Latency

No requests yet

Send a request to /v1/chat/completions to see results

{new Date(r.timestamp * 1000).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", second: "2-digit", })}

{r.input_preview}

{r.label === "injection" ? ( Injection ) : ( Benign )} {(r.score * 100).toFixed(1)}% {r.latency_ms.toFixed(0)} ms
); }