summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Hill <[email protected]>2026-03-04 16:35:03 +0000
committerDavid Hill <[email protected]>2026-03-04 16:35:03 +0000
commit0f1f55a24c18e4460872db96aad5bbb08b0fe5f7 (patch)
tree9b6c501fac66ccf343d5ee793fb89879b9efcb00
parent744c38cc7cfd4741227b9a1951ccba57668e2184 (diff)
downloadopencode-0f1f55a24c18e4460872db96aad5bbb08b0fe5f7.tar.gz
opencode-0f1f55a24c18e4460872db96aad5bbb08b0fe5f7.zip
tui: show Go request limits per 5-hour session
-rw-r--r--packages/console/app/src/i18n/en.ts4
-rw-r--r--packages/console/app/src/routes/go/index.tsx24
2 files changed, 15 insertions, 13 deletions
diff --git a/packages/console/app/src/i18n/en.ts b/packages/console/app/src/i18n/en.ts
index 01e5742dd..3f39fcd9d 100644
--- a/packages/console/app/src/i18n/en.ts
+++ b/packages/console/app/src/i18n/en.ts
@@ -257,10 +257,10 @@ export const dict = {
"go.pricing.body": "Use with any agent. Top up credit if needed. Cancel any time.",
"go.graph.free": "Free",
"go.graph.go": "Go",
- "go.graph.label": "Requests/month",
+ "go.graph.label": "Requests/5h",
"go.graph.usageLimits": "Usage limits",
"go.graph.tick": "{{n}}x",
- "go.graph.aria": "Requests per month: {{free}} vs {{go}}",
+ "go.graph.aria": "Requests per 5h: {{free}} vs {{go}}",
"go.testimonials.brand.zen": "Zen",
"go.testimonials.brand.go": "Go",
diff --git a/packages/console/app/src/routes/go/index.tsx b/packages/console/app/src/routes/go/index.tsx
index 3c1033074..4f737b4ee 100644
--- a/packages/console/app/src/routes/go/index.tsx
+++ b/packages/console/app/src/routes/go/index.tsx
@@ -48,13 +48,12 @@ function LimitsGraph(props: { href: string }) {
onCleanup(() => observer.disconnect())
})
- const free = 200 * 30
+ const free = 200
const models = [
- { id: "glm", name: "GLM-5", month: 5750, d: "120ms" },
- { id: "kimi", name: "Kimi K2.5", month: 9250, d: "240ms" },
- { id: "minimax", name: "MiniMax M2.5", month: 100000, d: "360ms" },
+ { id: "glm", name: "GLM-5", req: 1150, d: "120ms" },
+ { id: "kimi", name: "Kimi K2.5", req: 1850, d: "240ms" },
+ { id: "minimax", name: "MiniMax M2.5", req: 20000, d: "360ms" },
]
- const scale = 18
const ratio = (n: number) => n / free
const w = 720
@@ -64,12 +63,14 @@ function LimitsGraph(props: { href: string }) {
const top = 22
const bottom = 46
const plot = w - left - right
- const x = (r: number) => left + (Math.min(r, scale) / scale) * plot
+ const rmax = Math.max(1, ...models.map((m) => ratio(m.req)))
+ const log = (n: number) => Math.log10(Math.max(n, 1))
+ const x = (r: number) => left + (log(r) / log(rmax)) * plot
const start = (x(1) / w) * 100
const yFree = 74
const yGo = 134
- const ticks = [1, 2, 5, 10, 15]
+ const ticks = [1, 2, 5, 10, 25, 50, 100].filter((t) => t <= rmax)
const y = (n: number) => `${(n / h) * 100}%`
return (
@@ -100,10 +101,11 @@ function LimitsGraph(props: { href: string }) {
</g>
<g data-slot="go">
+ <line x1={x(1)} y1={yGo} x2={x(ratio(models[0]!.req))} y2={yGo} data-range data-animate="line" />
<line
- x1={x(ratio(models[0]!.month))}
+ x1={x(ratio(models[0]!.req))}
y1={yGo}
- x2={x(ratio(models[2]!.month))}
+ x2={x(ratio(models[2]!.req))}
y2={yGo}
data-range
data-animate="line"
@@ -111,7 +113,7 @@ function LimitsGraph(props: { href: string }) {
<For each={models}>
{(m) => (
<g style={{ "--d": m.d } as any}>
- <circle cx={x(ratio(m.month))} cy={yGo} r={5.5} data-point data-kind="go" data-model={m.id} />
+ <circle cx={x(ratio(m.req))} cy={yGo} r={5.5} data-point data-kind="go" data-model={m.id} />
</g>
)}
</For>
@@ -148,7 +150,7 @@ function LimitsGraph(props: { href: string }) {
<span data-item>
<i data-dot data-kind="go" data-model={m.id} />
<span data-name>{m.name}</span>
- <span data-value>{m.month.toLocaleString()}</span>
+ <span data-value>{m.req.toLocaleString()}</span>
</span>
)}
</For>