import type { RunSummary } from "@/shared/types"; import { RunStatusBadge } from "@/client/RunHistory"; export function RunSummaryPanel({ run }: { run: RunSummary | null }) { if (!run) { return (

结果摘要

还没有选择 run。

); } const metrics = run.metrics; return (

{run.model}

{run.id}

{run.error ?
{run.error}
: null} {run.files.raw ? (
raw
{run.files.raw}
summary
{run.files.summary}
) : null}
); } function Metric({ label, value }: { label: string; value: string }) { return (
{label} {value}
); } function formatMs(value: number | null | undefined) { return typeof value === "number" ? `${value.toFixed(1)}ms` : "-"; }