import type { RunResult } from "@/lib/types"; import { Badge, Bar, Card } from "./ui"; export function AuctionPanel({ run }: { run: RunResult }) { const sorted = [...run.bids].sort((a, b) => b.auction_score - a.auction_score); return (
{sorted.map((bid) => { const isWinner = bid.model_key === run.winner; return (
{isWinner ? "★ " : ""} {bid.model_name} {isWinner && winner} {bid.error && KO}
{bid.auction_score.toFixed(3)}
{bid.error ? (

{bid.error}

) : ( <>
conf {bid.confidence.toFixed(2)}
hist {bid.historical_accuracy.toFixed(2)}
cost {bid.cost_factor.toFixed(2)}
{bid.reason && (

“{bid.reason}”

)} )}
); })}

score = 0.7·conf + 0.2·hist − 0.1·cost

); }