opencode-agent[bot] 2 месяцев назад
Родитель
Сommit
1c76587ce2

+ 13 - 10
packages/stats/app/src/routes/[lab]/[model].tsx

@@ -376,10 +376,15 @@ function ModelUsageSection(props: { data: ModelUsagePoint[] }) {
 function ModelUsersSection(props: { data: ModelUsagePoint[] }) {
   return (
     <section id="users" data-section="model-panel">
-      <SectionTitle title="Unique Users" description="Daily unique OpenCode Go users over the recent two-month window." />
+      <SectionTitle
+        title="Unique Users"
+        description="Daily unique OpenCode Go users over the recent two-month window."
+      />
       <Show
         when={props.data.some((item) => item.users > 0)}
-        fallback={<ModelEmptyState title="No user data" description="No user-bearing rows landed in the current window." />}
+        fallback={
+          <ModelEmptyState title="No user data" description="No user-bearing rows landed in the current window." />
+        }
       >
         <ModelColumnChart data={props.data} metric="users" ariaLabel="Daily unique user chart" />
       </Show>
@@ -387,11 +392,7 @@ function ModelUsersSection(props: { data: ModelUsagePoint[] }) {
   )
 }
 
-function ModelColumnChart(props: {
-  data: ModelUsagePoint[]
-  metric: "tokens" | "users"
-  ariaLabel: string
-}) {
+function ModelColumnChart(props: { data: ModelUsagePoint[]; metric: "tokens" | "users"; ariaLabel: string }) {
   const [activeIndex, setActiveIndex] = createSignal<number>()
   const max = createMemo(() => Math.max(0, ...props.data.map((item) => modelUsageMetricValue(item, props.metric))) || 1)
   const activePoint = createMemo(() => {
@@ -458,9 +459,11 @@ function ModelColumnChart(props: {
             >
               <div
                 data-slot="model-usage-bar"
-                style={{
-                  "--model-usage-fill": `${modelUsageHeight(modelUsageMetricValue(point, props.metric), max())}%`,
-                } as JSX.CSSProperties}
+                style={
+                  {
+                    "--model-usage-fill": `${modelUsageHeight(modelUsageMetricValue(point, props.metric), max())}%`,
+                  } as JSX.CSSProperties
+                }
               />
               <Show when={activeIndex() === index() && activePoint()}>
                 {(active) => (

+ 8 - 2
packages/stats/app/src/routes/index.css

@@ -1578,7 +1578,10 @@
   left: auto;
 }
 
-[data-page="stats"] :is([data-section="top-models"], [data-section="unique-users"]) [data-component="chart-tooltip"] strong,
+[data-page="stats"]
+  :is([data-section="top-models"], [data-section="unique-users"])
+  [data-component="chart-tooltip"]
+  strong,
 [data-page="stats"]
   :is([data-section="top-models"], [data-section="unique-users"])
   [data-component="chart-tooltip"]
@@ -1589,7 +1592,10 @@
   white-space: nowrap;
 }
 
-[data-page="stats"] :is([data-section="top-models"], [data-section="unique-users"]) [data-component="chart-tooltip"] strong {
+[data-page="stats"]
+  :is([data-section="top-models"], [data-section="unique-users"])
+  [data-component="chart-tooltip"]
+  strong {
   padding: 8px 8px 0;
   font-weight: 500;
 }

+ 3 - 1
packages/stats/app/src/routes/index.tsx

@@ -791,7 +791,9 @@ function UniqueUsersSection(props: { data: StatsHomeData["users"] }) {
       <SectionTitle title="Unique Users" description="Daily unique OpenCode Go users by model." />
       <Show
         when={data().some((item) => usageTotal(item) > 0)}
-        fallback={<EmptyState title="No user data" description="No user-bearing model_stat rows matched this window." />}
+        fallback={
+          <EmptyState title="No user data" description="No user-bearing model_stat rows matched this window." />
+        }
       >
         <TopModelsChart
           data={data()}