fix(frontend): 分解请求单点超时 60s→300s+按钮耗时提示——修「AI 分解」假失败 [vps]
根因(10-09 VPS 实测): 分解=多轮 LLM 生成+确定性校验,真实耗时远超全局 60s axios 超时——前端先断开,uvicorn 随即取消 handler(不留访问日志/无 连接/线程 idle, 曾误判"卡死"),UI 显「分解失败」而服务端工作被腰斩。 decomposeHypothesis 单点放宽至 300s(草稿等快请求不受影响),按钮转 「分解中(约 1-3 分钟,勿关页)」防重复点击与提前关页。
This commit is contained in:
@@ -302,7 +302,10 @@ export interface DecomposeResult {
|
||||
}
|
||||
|
||||
export async function decomposeHypothesis(id: string): Promise<DecomposeResult> {
|
||||
const { data } = await apiClient.post<DecomposeResult>(`/pipeline/hypotheses/${id}/decompose`)
|
||||
// 分解=多轮 LLM 生成+确定性校验,真实耗时远超全局 60s 超时(10-09 VPS 实测
|
||||
// 前端 60s 先断→uvicorn 取消 handler=「分解失败」假象);单点放宽至 300s
|
||||
const { data } = await apiClient.post<DecomposeResult>(
|
||||
`/pipeline/hypotheses/${id}/decompose`, null, { timeout: 300000 })
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ function onDraftInput(key: keyof CardDraftInput, v: string) {
|
||||
<div v-if="canDecompose(h) || h.id === decomposing" class="hcard-ops">
|
||||
<button class="wiz-btn" :disabled="decomposing !== null"
|
||||
@click="runDecompose(h)">
|
||||
{{ decomposing === h.id ? '分解中…' : '⚡ AI 分解' }}
|
||||
{{ decomposing === h.id ? '分解中(约 1-3 分钟,勿关页)…' : '⚡ AI 分解' }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="hcard-foot">{{ h.updatedAt }}</div>
|
||||
|
||||
Reference in New Issue
Block a user