From 6cee61b9738f3f8527c98ccb9ce05182aa239cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 24 Sep 2026 14:48:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=EF=BC=9ADirect=20=E5=9B=9E?= =?UTF-8?q?=E5=90=88=E5=A4=B1=E8=B4=A5=E5=88=86=E6=94=AF=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=B5=8C=E5=A5=97=E4=B8=89=E5=85=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `runTurn` 的 catch 先把非结构化错误折成文本,再让结构化拒单文案覆盖,替掉原先"拒单 / Error / 其它"三层嵌套的三元表达式 --- .../chat/controller/useDirectProjectChatController.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/project-development/chat/controller/useDirectProjectChatController.ts b/apps/ai-game-creator-shell/src/view/project-development/chat/controller/useDirectProjectChatController.ts index 5ec05c34c..803d821fe 100644 --- a/apps/ai-game-creator-shell/src/view/project-development/chat/controller/useDirectProjectChatController.ts +++ b/apps/ai-game-creator-shell/src/view/project-development/chat/controller/useDirectProjectChatController.ts @@ -696,11 +696,9 @@ export function useDirectProjectChatController({ if (projectPathRef.current !== nextProjectPath) return false; // 认不出的拒单(宿主 / 环境事实)与其它非结构化错误走同一条通道:上报 + 横幅。 void captureAgentRuntimeError(error, DIRECT_CODEX_AGENT_ID); - const message = rejection - ? rejection.message - : error instanceof Error - ? error.message - : String(error); + // 拒单文案优先:它是宿主 `Display` 生成的唯一一份,比 `Error` 的形状更可信。 + let message = error instanceof Error ? error.message : String(error); + if (rejection) message = rejection.message; // 不再展开诊断详情:文案里没有引用,前端也不去读那份文件。线索留在 // `.agent/runtime/errors`、应用日志与错误上报池里,界面只显示这一句话。 const visibleMessage = projectRuntimeVisibleError(