fix(core,web): retry transport and quota LLM errors, disable dead sessions on auth failure (#82)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei ZhengandClaude Fable 5 authored and GitHub committed 2026-07-27 22:29:16 +08:00
1 parent c369e089a7
commit 3d3495528c
54 files changed
+2278 -161

No files matched your search

+15 -1
View File
@@ -626,10 +626,18 @@ Penguin 视觉风格(见 web-design 技能),深色/浅色主题(<html da
subagent: "子会话",
subagentRunning: "运行中",
aborted: (reason?: string) => `[已中断]${reason ? `:${reason}` : ""}`,
/** Auth-dead notice (request_end status "auth"): action-only copy — updating the key on the Models page auto-unlocks this Session. */
modelAuthDead: "模型 API 认证失败:请在模型配置页更新该模型的 API key,或新建会话。",
modelAuthDeadOpenModels: "打开模型配置",
modelAuthDeadRetry: "重试",
modelAuthDeadCta: "新建会话",
modelAuthDeadPlaceholder: "模型认证失败,请先更新 API key",
/** Reconnect hint line; `secondsLeft` (waiting state only) switches to the live-countdown wording. */
reconnect: (
status: "timeout" | "malformed",
state: "waiting" | "retried" | "gaveUp",
attempt: number,
secondsLeft?: number,
) => {
const cause = status === "timeout" ? "连接超时或网络中断" : "响应不完整或无法解析";
const action =
@@ -637,9 +645,15 @@ Penguin 视觉风格(见 web-design 技能),深色/浅色主题(<html da
? "已停止重试"
: state === "retried"
? `已发起第 ${attempt} 次重试`
: `正在发起第 ${attempt} 次重试…`;
: secondsLeft !== undefined
? `第 ${attempt} 次重试,${secondsLeft} 秒后发起…`
: `正在发起第 ${attempt} 次重试…`;
return `[重试] ${cause},${action}`;
},
/** "Retry now" on the reconnect countdown (skips the remaining backoff wait). */
reconnectRetryNow: "立即重试",
/** "Give up" on the reconnect countdown (the ordinary session abort). */
reconnectGiveUp: "放弃",
imageAlt: "用户上传的图片",
toolImageAlt: "工具输出的图片",
imagesAsPathHint: