From 5646824daf17a8460a42088d4e7620b932716cc0 Mon Sep 17 00:00:00 2001 From: Linghong Date: Fri, 11 Sep 2026 13:02:55 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=AD=96=E5=88=92Agent?= =?UTF-8?q?=E6=80=9D=E8=80=83=E5=B1=95=E7=A4=BA=E9=A2=84=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加策划 Agent reasoningText 事件字段与默认折叠展示入口 补充正文、思考过程和工具状态的字体层级样式 记录当前 Provider 尚未输出 reasoning 的现状与后续边界 --- .../src-tauri/src/agent/design_runtime.rs | 3 +++ apps/ai-game-creator-shell/src/App.tsx | 5 +++++ apps/ai-game-creator-shell/src/app/types.ts | 1 + .../project-workspace/ProjectSupervisorView.tsx | 8 ++++++++ apps/ai-game-creator-shell/src/styles.css | 12 ++++++++++++ ...术方案】策划Agent生产迁移与工作区浏览-2026-09-10.md | 6 ++++++ 6 files changed, 35 insertions(+) diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/design_runtime.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/design_runtime.rs index 1907ea4d3..0f6b61662 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/design_runtime.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/design_runtime.rs @@ -59,6 +59,8 @@ pub(crate) struct DesignEvent { kind: String, message_id: Option, text: Option, + #[serde(skip_serializing_if = "Option::is_none")] + reasoning_text: Option, view: Option, } @@ -97,6 +99,7 @@ fn design_event( kind: kind.to_string(), message_id: id.map(str::to_string), text, + reasoning_text: None, view, } } diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index f404ddd84..e6d659cea 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -742,6 +742,7 @@ export function App({ ); planningV2SessionRef.current = planningV2Session; const [planningV2TransientReply, setPlanningV2TransientReply] = useState(''); + const [planningV2Reasoning, setPlanningV2Reasoning] = useState(''); const planningV2TurnRef = useRef<{ projectPath: string; clientTurnId: string; @@ -1915,6 +1916,9 @@ export function App({ if (payload.kind === 'text' && payload.text != null) { setPlanningV2TransientReply(payload.text); } + if (payload.reasoningText != null) { + setPlanningV2Reasoning(payload.reasoningText); + } if (payload.kind === 'tool' && payload.text) { setPlanningV2TransientReply(payload.text); } @@ -11641,6 +11645,7 @@ export function App({ ? directCodexTransientReply : projectSupervisorTransientReply } + designReasoning={planningV2Reasoning} visibleMessages={visibleMessages} visibleProfessionalAgentCards={visibleProfessionalAgentCards} showProfessionalCollaboration={ diff --git a/apps/ai-game-creator-shell/src/app/types.ts b/apps/ai-game-creator-shell/src/app/types.ts index 81b84b326..cf57ba3a4 100644 --- a/apps/ai-game-creator-shell/src/app/types.ts +++ b/apps/ai-game-creator-shell/src/app/types.ts @@ -993,6 +993,7 @@ export interface DesignEvent { kind: string; messageId?: string | null; text?: string | null; + reasoningText?: string | null; view?: DesignView | null; } diff --git a/apps/ai-game-creator-shell/src/features/project-workspace/ProjectSupervisorView.tsx b/apps/ai-game-creator-shell/src/features/project-workspace/ProjectSupervisorView.tsx index 17499d5a9..10a3c515c 100644 --- a/apps/ai-game-creator-shell/src/features/project-workspace/ProjectSupervisorView.tsx +++ b/apps/ai-game-creator-shell/src/features/project-workspace/ProjectSupervisorView.tsx @@ -90,6 +90,7 @@ type ProjectSupervisorViewProps = RuntimePanelProps & { projectPath: string; showProfessionalCollaboration?: boolean; transientReply: string; + designReasoning?: string; visibleMessages: ChatMessage[]; visibleProfessionalAgentCards: AgentStatusCard[]; workspaceStatus: string; @@ -142,6 +143,7 @@ export function ProjectSupervisorView({ projectPath, showProfessionalCollaboration = true, transientReply, + designReasoning = '', visibleMessages, visibleProfessionalAgentCards, workspaceStatus, @@ -245,6 +247,12 @@ export function ProjectSupervisorView({ /> ))} + {designReasoning ? ( +
+ 显示思考过程 +
{designReasoning}
+
+ ) : null} {directCodex && (runtimePanelProps.controlBusy || Boolean(directProcessDetail)) ? (