tui: go plan payg msg (#26248)

This commit is contained in:
Aiden Cline
2026-05-07 16:53:24 -05:00
committed by GitHub
parent 22e64cac67
commit f5d0371efe
10 changed files with 285 additions and 83 deletions

View File

@@ -0,0 +1,37 @@
const retryAfterSeconds = 15 * 60
// const response = {
// type: "error",
// error: {
// type: "FreeUsageLimitError",
// message: "Free usage exceeded, subscribe to Go https://opencode.ai/go",
// },
// metadata: {},
// }
const response = {
type: "error",
error: {
type: "GoUsageLimitError",
message: "Subscription quota exceeded. You can continue using free models.",
},
metadata: {
workspace: "wrk_01K6XGM22R6FM8JVABE9XDQXGH",
limit: "5 hour",
resetAt: retryAfterSeconds,
},
}
Bun.serve({
port: 4141,
fetch() {
return Response.json(response, {
status: 429,
headers: {
"retry-after": String(retryAfterSeconds),
},
})
},
})
console.log("Zen limit repro server listening on http://localhost:4141")