diff --git a/packages/stats/app/src/routes/[lab]/[model].tsx b/packages/stats/app/src/routes/[lab]/[model].tsx index f865690df..838fa6925 100644 --- a/packages/stats/app/src/routes/[lab]/[model].tsx +++ b/packages/stats/app/src/routes/[lab]/[model].tsx @@ -26,6 +26,7 @@ import { type ModelCatalogCost, type ModelCatalogEntry, } from "../model-catalog" +import { statsRuntime } from "../../stats-runtime" import { applyThemePreference, Footer, @@ -95,7 +96,6 @@ const worldBorderPath = worldPath(mesh(worldTopology, worldCountryGeometries, (a const getModelData = query(async (lab: string, model: string) => { "use server" - const { statsRuntime } = await import("../../stats-runtime") return statsRuntime.runPromise(getStatsModelData(model, lab)) }, "getStatsModelData") diff --git a/packages/stats/app/src/routes/[lab]/index.tsx b/packages/stats/app/src/routes/[lab]/index.tsx index e1af50fa4..fc4482639 100644 --- a/packages/stats/app/src/routes/[lab]/index.tsx +++ b/packages/stats/app/src/routes/[lab]/index.tsx @@ -16,6 +16,7 @@ import { type ModelCatalogEntry, type ModelCatalogLab, } from "../model-catalog" +import { statsRuntime } from "../../stats-runtime" import { applyThemePreference, Footer, @@ -45,7 +46,6 @@ const labFooterLinks: readonly HeaderLink[] = [ const getLabData = query(async (lab: string) => { "use server" - const { statsRuntime } = await import("../../stats-runtime") return statsRuntime.runPromise(getStatsLabData(lab)) }, "getStatsLabData") diff --git a/packages/stats/app/src/routes/api/health.ts b/packages/stats/app/src/routes/api/health.ts index 2a07bfc4e..b648adb20 100644 --- a/packages/stats/app/src/routes/api/health.ts +++ b/packages/stats/app/src/routes/api/health.ts @@ -1,8 +1,8 @@ import { AppConfig } from "@opencode-ai/stats-core/config" import { Effect } from "effect" +import { statsRuntime } from "../../stats-runtime" export async function GET() { - const { statsRuntime } = await import("../../stats-runtime") return Response.json( await statsRuntime.runPromise( Effect.gen(function* () { diff --git a/packages/stats/app/src/routes/index.tsx b/packages/stats/app/src/routes/index.tsx index 2439369b6..90ba9ce9f 100644 --- a/packages/stats/app/src/routes/index.tsx +++ b/packages/stats/app/src/routes/index.tsx @@ -26,6 +26,7 @@ import { createEffect, createMemo, createSignal, For, onCleanup, onMount, Show, import { getRequestEvent } from "solid-js/web" import type { FeatureCollection, GeometryObject, GeoJsonProperties } from "geojson" import type { GeometryCollection, Topology } from "topojson-specification" +import { statsRuntime } from "../stats-runtime" import { findModelCatalogEntry, getModelCatalog, type ModelCatalog } from "./model-catalog" import { applyThemePreference, @@ -108,7 +109,6 @@ const worldBorderPath = worldPath(mesh(worldTopology, worldCountryGeometries, (a const getData = query(async () => { "use server" - const { statsRuntime } = await import("../stats-runtime") return statsRuntime.runPromise(getStatsHomeData()) }, "getStatsHomeData")