Skip to content

Commit a114a97

Browse files
committed
More progress
1 parent ca67e4c commit a114a97

File tree

18 files changed

+566
-2122
lines changed

18 files changed

+566
-2122
lines changed

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"esbenp.prettier-vscode",
77
"csstools.postcss",
88
"bradlc.vscode-tailwindcss",
9-
"connor4312.esbuild-problem-matchers"
9+
"connor4312.esbuild-problem-matchers",
10+
"yoavbls.pretty-ts-errors"
1011
]
1112
}

apps/website/drizzle.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { defineConfig } from "drizzle-kit"
22

3-
if ((!process.env.TURSO_CONNECTION_URL || !process.env.TURSO_AUTH_TOKEN) && !process.env.BENCHMARKS_DB_PATH) {
4-
throw new Error("TURSO_CONNECTION_URL and TURSO_AUTH_TOKEN or BENCHMARKS_DB_PATH must be set")
5-
}
6-
73
const dialect = process.env.BENCHMARKS_DB_PATH ? "sqlite" : "turso"
84

95
const dbCredentials = process.env.BENCHMARKS_DB_PATH

apps/website/next.config.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
import type { NextConfig } from "next"
22

33
const nextConfig: NextConfig = {
4-
/* config options here */
4+
webpack: (config) => {
5+
config.resolve.extensionAlias = { ".js": [".ts", ".tsx", ".js", ".jsx"] }
6+
return config
7+
},
58
async redirects() {
69
return [
710
// Redirect www to non-www
811
{
912
source: "/:path*",
10-
has: [
11-
{
12-
type: "host",
13-
value: "www.roocode.com",
14-
},
15-
],
13+
has: [{ type: "host", value: "www.roocode.com" }],
1614
destination: "https://roocode.com/:path*",
1715
permanent: true,
1816
},
1917
// Redirect HTTP to HTTPS
2018
{
2119
source: "/:path*",
22-
has: [
23-
{
24-
type: "header",
25-
key: "x-forwarded-proto",
26-
value: "http",
27-
},
28-
],
20+
has: [{ type: "header", key: "x-forwarded-proto", value: "http" }],
2921
destination: "https://roocode.com/:path*",
3022
permanent: true,
3123
},

apps/website/package.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,41 @@
1818
"db:studio": "pnpm drizzle-kit studio"
1919
},
2020
"dependencies": {
21-
"@libsql/client": "^0.15.2",
22-
"@radix-ui/react-dialog": "^1.1.6",
23-
"@radix-ui/react-slot": "^1.1.2",
24-
"@tanstack/react-query": "^5.71.10",
21+
"@libsql/client": "^0.15.7",
22+
"@radix-ui/react-dialog": "^1.1.14",
23+
"@radix-ui/react-slot": "^1.2.3",
24+
"@roo-code/types": "workspace:^",
25+
"@tanstack/react-query": "^5.79.0",
2526
"class-variance-authority": "^0.7.1",
2627
"clsx": "^2.1.1",
2728
"drizzle-orm": "^0.41.0",
2829
"drizzle-zod": "^0.7.1",
2930
"embla-carousel-auto-scroll": "^8.6.0",
3031
"embla-carousel-autoplay": "^8.6.0",
3132
"embla-carousel-react": "^8.6.0",
32-
"framer-motion": "^12.6.3",
33+
"framer-motion": "^12.15.0",
3334
"lucide-react": "^0.479.0",
3435
"next": "15.2.4",
3536
"next-themes": "^0.4.6",
36-
"posthog-js": "^1.234.9",
37+
"posthog-js": "^1.248.1",
3738
"react": "^18.3.1",
3839
"react-dom": "^18.3.1",
3940
"react-icons": "^5.5.0",
40-
"recharts": "^2.15.2",
41-
"tailwind-merge": "^3.1.0",
41+
"recharts": "^2.15.3",
42+
"tailwind-merge": "^3.3.0",
4243
"tailwindcss-animate": "^1.0.7",
43-
"zod": "^3.24.2"
44+
"zod": "^3.25.41"
4445
},
4546
"devDependencies": {
4647
"@roo-code/config-eslint": "workspace:^",
4748
"@roo-code/config-typescript": "workspace:^",
4849
"@tailwindcss/typography": "^0.5.16",
49-
"@types/node": "^20.17.30",
50-
"@types/react": "^18.3.18",
51-
"@types/react-dom": "^18.3.5",
50+
"@types/node": "^20.17.54",
51+
"@types/react": "^18.3.23",
52+
"@types/react-dom": "^18.3.7",
5253
"autoprefixer": "^10.4.21",
5354
"drizzle-kit": "^0.30.6",
54-
"postcss": "^8.5.3",
55+
"postcss": "^8.5.4",
5556
"tailwindcss": "^3.4.17"
5657
}
5758
}

apps/website/src/app/evals/evals.tsx

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { ScatterChart, Scatter, XAxis, YAxis, Label, Customized, Cross } from "r
66
import { TaskMetrics, type Run } from "@/db"
77

88
import { ChartConfig, ChartLegend, ChartLegendContent } from "@/components/ui/chart"
9-
import { ModelInfo, RooCodeSettings } from "@/lib/schemas"
109
import { formatTokens, formatCurrency, formatDuration, formatScore } from "@/lib"
1110
import {
1211
ChartContainer,
@@ -20,6 +19,7 @@ import {
2019
TableHeader,
2120
TableRow,
2221
} from "@/components/ui"
22+
import { useOpenRouterModels } from "@/lib/hooks/use-open-router-models"
2323

2424
export function Evals({
2525
runs,
@@ -29,25 +29,29 @@ export function Evals({
2929
score: number
3030
languageScores?: Record<"go" | "java" | "javascript" | "python" | "rust", number>
3131
taskMetrics: TaskMetrics
32-
settings?: RooCodeSettings
33-
modelInfo?: ModelInfo | null
32+
modelId?: string
3433
})[]
3534
}) {
36-
const data = useMemo(
35+
const { data: openRouterModels } = useOpenRouterModels()
36+
37+
const tableData = useMemo(
3738
() =>
38-
runs
39-
.map((run) => ({
40-
label: run.description || run.model,
41-
score: run.score,
42-
cost: run.taskMetrics.cost,
43-
}))
44-
.filter(({ cost }) => cost < 100),
45-
[runs],
39+
runs.map((run) => ({
40+
...run,
41+
label: run.description || run.model,
42+
score: run.score,
43+
cost: run.taskMetrics.cost,
44+
model: openRouterModels?.[run.modelId ?? ""],
45+
modelInfo: openRouterModels?.[run.modelId ?? ""]?.modelInfo,
46+
})),
47+
[runs, openRouterModels],
4648
)
4749

50+
const chartData = useMemo(() => tableData.filter(({ cost }) => cost < 100), [tableData])
51+
4852
const chartConfig = useMemo(
49-
() => data.reduce((acc, run) => ({ ...acc, [run.label]: run }), {} as ChartConfig),
50-
[data],
53+
() => chartData.reduce((acc, run) => ({ ...acc, [run.label]: run }), {} as ChartConfig),
54+
[chartData],
5155
)
5256

5357
return (
@@ -119,10 +123,10 @@ export function Evals({
119123
</TableRow>
120124
</TableHeader>
121125
<TableBody className="font-mono">
122-
{runs.map((run) => (
126+
{tableData.map((run) => (
123127
<TableRow key={run.id}>
124-
<TableCell>
125-
<div className="font-sans">{run.label}</div>
128+
<TableCell title={run.model?.description}>
129+
<div className="font-sans">{run.model?.name || run.label}</div>
126130
<div className="text-xs opacity-50">
127131
{formatTokens(run.modelInfo?.contextWindow ?? 0)}
128132
</div>
@@ -190,7 +194,7 @@ export function Evals({
190194
</YAxis>
191195
<ChartTooltip content={<ChartTooltipContent labelKey="label" hideIndicator />} />
192196
<Customized component={renderQuadrant} />
193-
{data.map((d, i) => (
197+
{chartData.map((d, i) => (
194198
<Scatter key={d.label} name={d.label} data={[d]} fill={`hsl(var(--chart-${i + 1}))`} />
195199
))}
196200
<ChartLegend content={<ChartLegendContent />} />

apps/website/src/app/evals/page.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Metadata } from "next"
22

3+
import { rooCodeSettingsSchema, getModelId } from "@roo-code/types"
4+
35
import { getRuns } from "@/db"
4-
import { getLanguageScores } from "@/lib/server/get-language-scores"
5-
import { rooCodeSettingsSchema } from "@/lib/schemas"
6-
import { getModelInfo } from "@/lib/model-info"
6+
import { getLanguageScores } from "@/lib/server"
77
import { formatScore } from "@/lib"
88

99
import { Evals } from "./evals"
@@ -41,8 +41,7 @@ export default async function Page() {
4141
score: formatScore(run.passed / (run.passed + run.failed)),
4242
languageScores: languageScores[run.id],
4343
taskMetrics: run.taskMetrics!,
44-
settings: settings,
45-
modelInfo: getModelInfo(settings),
44+
modelId: getModelId(settings),
4645
}
4746
})
4847

apps/website/src/components/ui/card.tsx

Lines changed: 0 additions & 43 deletions
This file was deleted.

apps/website/src/lib/analytics.ts

Lines changed: 0 additions & 86 deletions
This file was deleted.

apps/website/src/lib/constants.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/**
2-
* Shared URLs used throughout the application
3-
*/
41
export const EXTERNAL_LINKS = {
52
GITHUB: "https://github.com/RooVetGit/Roo-Code",
63
DISCORD: "https://discord.gg/roocode",

0 commit comments

Comments
 (0)