infinite slop

This commit is contained in:
Theo Browne
2026-02-19 23:51:56 -08:00
parent c9d68d58eb
commit 53f0543e99
4 changed files with 13 additions and 8 deletions

View File

@@ -50,7 +50,7 @@ function RoundView({ round, total }: { round: RoundState; total: number }) {
{/* Header */}
<Box>
<Text bold backgroundColor="blueBright" color="black">
{` ROUND ${round.num}/${total} `}
{` ROUND ${round.num}${total !== Infinity && total !== null ? `/${total}` : ''} `}
</Text>
</Box>
<Text dimColor>{"─".repeat(50)}</Text>
@@ -196,7 +196,7 @@ function Scoreboard({ scores }: { scores: Record<string, number> }) {
{name.padEnd(NAME_PAD)}
</Text>
<Text color={MODEL_COLORS[name]}>{bar}</Text>
<Text bold>{score}</Text>
<Text bold>{score} {score === 1 ? 'win' : 'wins'}</Text>
<Text>{medal}</Text>
</Box>
);
@@ -258,7 +258,8 @@ function Game({ runs }: { runs: number }) {
// ── Main ────────────────────────────────────────────────────────────────────
const runsArg = process.argv.find((a) => a.startsWith("runs="));
const runs = runsArg ? parseInt(runsArg.split("=")[1] ?? "5", 10) : 5;
const runsVal = runsArg ? runsArg.split("=")[1] : "infinite";
const runs = runsVal === "infinite" ? Infinity : parseInt(runsVal || "infinite", 10);
if (!process.env.OPENROUTER_API_KEY) {
console.error("Error: Set OPENROUTER_API_KEY environment variable");