补充策划Agent思考展示预留

增加策划 Agent reasoningText 事件字段与默认折叠展示入口

补充正文、思考过程和工具状态的字体层级样式

记录当前 Provider 尚未输出 reasoning 的现状与后续边界
This commit is contained in:
2026-09-11 13:02:55 +00:00
parent d9530047db
commit 5646824daf
6 changed files with 35 additions and 0 deletions
@@ -59,6 +59,8 @@ pub(crate) struct DesignEvent {
kind: String,
message_id: Option<String>,
text: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
reasoning_text: Option<String>,
view: Option<DesignView>,
}
@@ -97,6 +99,7 @@ fn design_event(
kind: kind.to_string(),
message_id: id.map(str::to_string),
text,
reasoning_text: None,
view,
}
}
+5
View File
@@ -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={
@@ -993,6 +993,7 @@ export interface DesignEvent {
kind: string;
messageId?: string | null;
text?: string | null;
reasoningText?: string | null;
view?: DesignView | null;
}
@@ -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({
/>
</div>
))}
{designReasoning ? (
<details className="design-agent-reasoning">
<summary></summary>
<pre>{designReasoning}</pre>
</details>
) : null}
{directCodex &&
(runtimePanelProps.controlBusy || Boolean(directProcessDetail)) ? (
<section
+12
View File
@@ -9149,3 +9149,15 @@ button.design-workspace-tree__entry:hover,
background: #fff;
font-size: 12px;
}
.design-agent-reasoning {
margin: 8px 0;
color: var(--text-muted);
font-size: 0.82em;
}
.design-agent-reasoning summary { cursor: pointer; }
.design-agent-reasoning pre {
margin: 6px 0 0;
white-space: pre-wrap;
font: inherit;
opacity: 0.8;
}
@@ -339,3 +339,9 @@ UI 使用“批准”和“继续修改”两个文字按钮,分别配 Lucide
- 多个策划身份提示词同时存在;
- 多 Agent 协作;
- 旧 Fast GDD 展示和 GDD schema 兼容。
## 14. 策划 Agent reasoning 展示现状
右侧栏已预留策划 Agent 的 `reasoningText` 事件字段和默认折叠的展示样式,但当前 Provider 解析链仍会过滤 reasoning 内容,尚未向策划 Runtime 产出该字段。因此现阶段只展示用户可见正文和工具状态;reasoning 折叠区在没有数据时不会出现。
后续若补充 reasoning,需要在策划 Agent 专用 Provider 解析层接入,不能直接修改共享 Provider 以免影响 GameAgent。