fix: adjust tui retry dialog logic to be more provider specific and error case specific (#26366)

This commit is contained in:
Aiden Cline
2026-05-08 10:48:19 -05:00
committed by GitHub
parent df75bfe07c
commit 799996db76
8 changed files with 98 additions and 64 deletions

View File

@@ -1,37 +0,0 @@
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")