From 137533484b876672bf2a4a5d18315629182c3c94 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:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E5=87=BA=E7=AD=96=E5=88=92=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E5=85=B1=E7=94=A8=E7=9A=84=20Design=20=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E5=88=A4=E6=8D=AE=E4=B8=8E=E5=9B=9E=E8=B0=83=E5=85=9C?= =?UTF-8?q?=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/PlanningChatView.tsx 新增 designMode、designActionsBusy 与三个 Design 回调兜底常量 - DesignAgentPhaseStatus(顶部)与 DesignAgentPendingActions(底部)原先各自重复 designView||onDesignApprove、controlBusy||planGddDecisionBusy 和 ?? (()=>undefined),现在共用同一份取值 --- .../planning/PlanningChatView.tsx | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/project-development/planning/PlanningChatView.tsx b/apps/ai-game-creator-shell/src/view/project-development/planning/PlanningChatView.tsx index 2bc1d5236..9c128b07f 100644 --- a/apps/ai-game-creator-shell/src/view/project-development/planning/PlanningChatView.tsx +++ b/apps/ai-game-creator-shell/src/view/project-development/planning/PlanningChatView.tsx @@ -206,6 +206,12 @@ export function PlanningChatView({ needsUserInput || Boolean(designView?.session.pendingApproval) || Boolean(designView?.session.pendingClarification); + // 顶部状态条与底部待办区渲染的是同一份 Design Agent 状态,判据与回调兜底必须同源。 + const designMode = Boolean(designView || onDesignApprove); + const designActionsBusy = controlBusy || planGddDecisionBusy; + const handleDesignApprove = onDesignApprove ?? (() => undefined); + const handleDesignClarify = onDesignClarify ?? (() => undefined); + const handleDesignRetry = onDesignRetry ?? (() => undefined); const renderMessage = (message: ChatMessage, index: number) => (
- {designView || onDesignApprove ? ( + {designMode ? ( undefined)} - onClarify={onDesignClarify ?? (() => undefined)} - onRetry={onDesignRetry ?? (() => undefined)} + onApprove={handleDesignApprove} + onClarify={handleDesignClarify} + onRetry={handleDesignRetry} /> ) : (
) : null} - {designView || onDesignApprove ? ( + {designMode ? ( undefined)} - onClarify={onDesignClarify ?? (() => undefined)} - onRetry={onDesignRetry ?? (() => undefined)} + onApprove={handleDesignApprove} + onClarify={handleDesignClarify} + onRetry={handleDesignRetry} /> ) : null}