Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

514 B
Raw Blame
/** Pure helpers of the benchmark page (M4). */
import { BENCHMARK_PROMPTS, type BenchmarkResult } from '../../../../lib/benchmark-prompts'

/** The newest run of each prompt, in the order of the prompts. Pure. */
export function latestRuns(runs: readonly BenchmarkResult[]): BenchmarkResult[] {
  const out: BenchmarkResult[] = []
  for (const prompt of BENCHMARK_PROMPTS) {
    const mine = runs.filter((r) => r.promptId === prompt.id)
    if (mine.length > 0) out.push(mine[mine.length - 1])
  }
  return out
}