fix: 电商视频生成链路稳定性 — AI超时/重试/断点续传 + 404页面 + DashScope Key移除

- adVideoPlanClient: 模型级联降级(qwen-max→plus→turbo), 5xx/网络错误可重试, 超时延长至180s, 错误信息包含上游响应体
- 服务端ai/chat: 超时60s→120s, AbortError返回504(非500), PM2已热重载
- EcommerceVideoWorkspace: 策划失败后支持从断点继续(保留已完成步骤的中间产物), 分镜图/视频生成仅重做失败场景
- scriptEvalClient: 移除客户端DASHSCOPE_API_KEY引用(Nginx代理注入)
- NotFoundPage: 未知路由显示404页面(替代兜底跳首页)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-03 12:16:33 +08:00
parent d70f7a231f
commit 56dabf1f7d
11 changed files with 373 additions and 120 deletions
+9 -4
View File
@@ -33,6 +33,7 @@ import {
import { webGenerationGateway, type CreatePreviewTaskInput } from "./api/webGenerationGateway";
import { translateTaskError } from "./utils/translateTaskError";
import AppShell from "./components/AppShell";
const NotFoundPage = lazy(() => import("./components/NotFoundPage"));
import { cloneWorkflow, createBlankWorkflow } from "./data/workflows";
const AgentPage = lazy(() => import("./features/agent/AgentPage"));
const AssetsPage = lazy(() => import("./features/assets/AssetsPage"));
@@ -115,9 +116,10 @@ const VIEW_KEYS = new Set<WebViewKey>([
"communityCaseAdd",
"report",
"providerHealth",
"not-found",
]);
const PUBLIC_VIEW_SET = new Set<WebViewKey>(["home", "login", "community", "more"]);
const PUBLIC_VIEW_SET = new Set<WebViewKey>(["home", "login", "community", "more", "not-found"]);
function normalizeViewKey(rawView: string): WebViewKey {
const normalized =
@@ -130,7 +132,7 @@ function normalizeViewKey(rawView: string): WebViewKey {
: rawView === "community-case-add"
? "communityCaseAdd"
: rawView;
return VIEW_KEYS.has(normalized as WebViewKey) ? (normalized as WebViewKey) : "home";
return VIEW_KEYS.has(normalized as WebViewKey) ? (normalized as WebViewKey) : "not-found";
}
function readViewFromHash(): WebViewKey {
@@ -146,7 +148,8 @@ function isWorkspaceView(view: WebViewKey): boolean {
view !== "ecommerceHub" &&
view !== "ecommerce" &&
view !== "scriptTokens" &&
view !== "login"
view !== "login" &&
view !== "not-found"
);
}
@@ -1178,7 +1181,6 @@ function App() {
/>
);
case "home":
default:
return (
<HomePage
onOpenGenerate={() => handleSetView("workbench")}
@@ -1190,6 +1192,9 @@ function App() {
onOpenImageTool={handleOpenImageWorkbenchTool}
/>
);
case "not-found":
default:
return <NotFoundPage onGoHome={() => handleSetView("home")} />;
}
})();