11import type { Metadata } from "next"
22
3- import { rooCodeSettingsSchema , getModelId } from "@roo-code/types"
4- import { getRuns , getLanguageScores } from "@roo-code/evals"
5-
6- import { formatScore } from "@/lib"
3+ import { getEvalRuns } from "@/actions/evals"
74
85import { Evals } from "./evals"
96
107export const revalidate = 300
8+ export const dynamic = "force-dynamic"
119
1210export const metadata : Metadata = {
1311 title : "Roo Code Evals" ,
@@ -25,24 +23,7 @@ export const metadata: Metadata = {
2523}
2624
2725export default async function Page ( ) {
28- const languageScores = await getLanguageScores ( )
29-
30- const runs = ( await getRuns ( ) )
31- . filter ( ( run ) => ! ! run . taskMetrics )
32- . filter ( ( { settings } ) => rooCodeSettingsSchema . safeParse ( settings ) . success )
33- . sort ( ( a , b ) => b . passed - a . passed )
34- . map ( ( run ) => {
35- const settings = rooCodeSettingsSchema . parse ( run . settings )
36-
37- return {
38- ...run ,
39- label : run . description || run . model ,
40- score : formatScore ( run . passed / ( run . passed + run . failed ) ) ,
41- languageScores : languageScores [ run . id ] ,
42- taskMetrics : run . taskMetrics ! ,
43- modelId : getModelId ( settings ) ,
44- }
45- } )
26+ const runs = await getEvalRuns ( )
4627
4728 return < Evals runs = { runs } />
4829}
0 commit comments