From 316013188927e2474e6e27b9210abf711b30561a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Sat, 19 Sep 2026 23:09:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E6=BE=84=E6=B8=85=E9=97=AE=E7=AD=94?= =?UTF-8?q?=E5=8D=A1=E6=8F=90=E4=BA=A4=E8=B7=AF=E5=BE=84=E8=A1=A5=E4=B8=8A?= =?UTF-8?q?=20rejection=20=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - apps/ai-game-creator-shell/src/view/project-development/planning/PlanningUserInputCard.tsx 在 Promise.resolve(onSubmit(...)).finally(...) 之间加 .catch(() => undefined) - onSubmit 的契约允许返回 rejected promise,原先只挂 finally 会把 rejection 变成未处理拒绝;与 GddApprovalCard 的处理口径一致 --- .../project-development/planning/PlanningUserInputCard.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src/view/project-development/planning/PlanningUserInputCard.tsx b/apps/ai-game-creator-shell/src/view/project-development/planning/PlanningUserInputCard.tsx index dff533d0b..7cdd35eb5 100644 --- a/apps/ai-game-creator-shell/src/view/project-development/planning/PlanningUserInputCard.tsx +++ b/apps/ai-game-creator-shell/src/view/project-development/planning/PlanningUserInputCard.tsx @@ -96,7 +96,10 @@ export function PlanningUserInputCard({ setSubmitting(true); void Promise.resolve( onSubmit?.(request, responseId, normalizedAnswers), - ).finally(() => setSubmitting(false)); + ) + // onSubmit 允许返回 rejected promise;这里兜住,避免未处理的 rejection。 + .catch(() => undefined) + .finally(() => setSubmitting(false)); }} > {submitLabel}