From 7ae6eddb72c82ec6f16dd0143a6186c7de8038cb Mon Sep 17 00:00:00 2001 From: claude_dev Date: Fri, 9 Oct 2026 08:58:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E5=88=86=E8=A7=A3=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=8D=95=E7=82=B9=E8=B6=85=E6=97=B6=2060s=E2=86=92300?= =?UTF-8?q?s+=E6=8C=89=E9=92=AE=E8=80=97=E6=97=B6=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E2=80=94=E2=80=94=E4=BF=AE=E3=80=8CAI=20=E5=88=86=E8=A7=A3?= =?UTF-8?q?=E3=80=8D=E5=81=87=E5=A4=B1=E8=B4=A5=20[vps]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因(10-09 VPS 实测): 分解=多轮 LLM 生成+确定性校验,真实耗时远超全局 60s axios 超时——前端先断开,uvicorn 随即取消 handler(不留访问日志/无 连接/线程 idle, 曾误判"卡死"),UI 显「分解失败」而服务端工作被腰斩。 decomposeHypothesis 单点放宽至 300s(草稿等快请求不受影响),按钮转 「分解中(约 1-3 分钟,勿关页)」防重复点击与提前关页。 --- frontend/src/api/pipeline.ts | 5 ++++- frontend/src/views/pipeline/HypothesisPool.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/api/pipeline.ts b/frontend/src/api/pipeline.ts index bc58cf5f..e95afd66 100644 --- a/frontend/src/api/pipeline.ts +++ b/frontend/src/api/pipeline.ts @@ -302,7 +302,10 @@ export interface DecomposeResult { } export async function decomposeHypothesis(id: string): Promise { - const { data } = await apiClient.post(`/pipeline/hypotheses/${id}/decompose`) + // 分解=多轮 LLM 生成+确定性校验,真实耗时远超全局 60s 超时(10-09 VPS 实测 + // 前端 60s 先断→uvicorn 取消 handler=「分解失败」假象);单点放宽至 300s + const { data } = await apiClient.post( + `/pipeline/hypotheses/${id}/decompose`, null, { timeout: 300000 }) return data } diff --git a/frontend/src/views/pipeline/HypothesisPool.vue b/frontend/src/views/pipeline/HypothesisPool.vue index 6cfadb17..48f1909a 100644 --- a/frontend/src/views/pipeline/HypothesisPool.vue +++ b/frontend/src/views/pipeline/HypothesisPool.vue @@ -179,7 +179,7 @@ function onDraftInput(key: keyof CardDraftInput, v: string) {
{{ h.updatedAt }}