From 99e6bfa139bcd0f931abf744a7a2122ee0acde35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Tue, 6 Oct 2026 21:06:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E5=BC=B9=E7=AA=97=E7=9A=84?= =?UTF-8?q?=20agent=20=E6=8C=89=E9=92=AE=E6=94=B9=E6=88=90=E6=97=A9?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=BC=8F=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xiaohongshu/FailureDialog.tsx:嵌套三元改成 if 块,保持「文案与 handler 一起定」不变。 --- .../export/tabs/xiaohongshu/FailureDialog.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/project-development/export/tabs/xiaohongshu/FailureDialog.tsx b/apps/ai-game-creator-shell/src/view/project-development/export/tabs/xiaohongshu/FailureDialog.tsx index 009cfe802..4075b370a 100644 --- a/apps/ai-game-creator-shell/src/view/project-development/export/tabs/xiaohongshu/FailureDialog.tsx +++ b/apps/ai-game-creator-shell/src/view/project-development/export/tabs/xiaohongshu/FailureDialog.tsx @@ -39,13 +39,16 @@ export function FailureDialog({ }) { const repairability = failure ? classifyXhsMinitoolFailure(failure) : null; // 文案与点击处理一起定:只存一句中文再按它反查 handler 的话,改文案就会静默接错动作。 - const agentAction = - !failure || - repairability === XhsMinitoolFailureRepairability.OnlyHumanRepairable - ? null - : failure.type === 'buildScriptMissing' + let agentAction: { label: string; onClick: () => void } | null = null; + if ( + failure && + repairability !== XhsMinitoolFailureRepairability.OnlyHumanRepairable + ) { + agentAction = + failure.type === 'buildScriptMissing' ? { label: '让陶泥儿帮我调通', onClick: onAdapt } : { label: '让陶泥儿来修', onClick: onRepair }; + } return (