diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index e61bfee65..3d39bf6ca 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -6627,6 +6627,16 @@ export function App({ setProjectSupervisorRuntimeError('待回答问题已变更,请刷新策划状态'); return; } + setMessages((current) => [ + ...current, + { + role: 'user', + text: answer, + runtimeOwned: true, + messageId: `planning-v2:${responseId}:user`, + updatedAt: Date.now(), + }, + ]); await executePlanningV2Turn(nextProjectPath, answer, responseId); return; } diff --git a/apps/ai-game-creator-shell/src/features/project-workspace/PlanningLaneRuntimeStrip.tsx b/apps/ai-game-creator-shell/src/features/project-workspace/PlanningLaneRuntimeStrip.tsx index 8f89c10a3..f3d7c1375 100644 --- a/apps/ai-game-creator-shell/src/features/project-workspace/PlanningLaneRuntimeStrip.tsx +++ b/apps/ai-game-creator-shell/src/features/project-workspace/PlanningLaneRuntimeStrip.tsx @@ -171,7 +171,7 @@ export function PlanningLaneRuntimeStrip({ ) : null} ) : null} - {userInputRequest ? ( + {userInputRequest && !controlBusy ? ( `${String.fromCharCode(65 + index)}. ${option.label}`, + (option, index) => + `${String.fromCharCode(65 + index)}. ${option.label}\n ${option.description}`, ) .join('\n'); return `${question.header}\n${question.question}\n${options}`; @@ -287,7 +288,29 @@ function messageDisplayText(message: PlanningMessageV2) { const title = typeof game?.title === 'string' ? game.title.trim() : ''; const version = typeof artifact?.version === 'number' ? artifact.version : null; - return `已生成 GDD${version === null ? '' : ` v${version}`}${title ? `:${title}` : ''}`; + const oneLiner = + typeof game?.oneLiner === 'string' ? game.oneLiner.trim() : ''; + const decisions = Array.isArray(nested?.decisions) + ? nested.decisions + .map((value) => { + const decision = asRecord(value); + const topic = + typeof decision?.topic === 'string' ? decision.topic.trim() : ''; + const summary = + typeof decision?.answerSummary === 'string' + ? decision.answerSummary.trim() + : ''; + return topic && summary ? `- ${topic}:${summary}` : null; + }) + .filter((value): value is string => Boolean(value)) + : []; + return [ + `已生成 GDD${version === null ? '' : ` v${version}`}${title ? `:${title}` : ''}`, + oneLiner, + decisions.length > 0 ? `本轮决策:\n${decisions.join('\n')}` : '', + ] + .filter(Boolean) + .join('\n'); } if (message.kind === 'error') { const summary = typeof payload?.summary === 'string' ? payload.summary : '';