修复策划 Agent 四个审查问题
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / Frontend tests (pull_request) Successful in 2m40s
Project CI / Native shell tests (pull_request) Successful in 17m42s

修复 Retry 流式回合身份与阶段审批 transient 清理

拒绝无效 write_file 内容并补齐顾问阶段导轨
This commit is contained in:
2026-09-11 10:57:49 +00:00
parent 712f28e207
commit 811abdd375
5 changed files with 16 additions and 3 deletions
@@ -164,6 +164,7 @@ fn prepare_design_input(
return Err("当前没有需要恢复的回合".into());
}
session.last_error = None;
begin_design_turn(session, id);
} else {
if session.turn.as_ref().is_some_and(|turn| turn.pending) {
return Err("上次回合尚未完成,请先恢复回合".into());
@@ -257,7 +257,7 @@ pub(crate) fn execute_design_file_tool(
let content = args
.get("content")
.and_then(Value::as_str)
.unwrap_or_default();
.ok_or("content 必须是字符串")?;
let (display, path) = resolve_design_workspace_path(root, &relative)?;
crate::write_game_creator_private_file(&path, content.as_bytes(), "策划工作区文件")?;
Ok(Value::String(format!("已写入 {display}")))
+12 -1
View File
@@ -11622,6 +11622,12 @@ export function App({
return;
}
const clientTurnId = createAgentChatRunId('design-agent-turn');
designAgentTurnRef.current = {
projectPath: nextProjectPath,
clientTurnId,
};
setPlanningV2TransientReply('');
setChatAgentBusy(true);
setPlanGddDecisionBusy(true);
void invoke<DesignView>('decide_design_phase', {
projectPath: nextProjectPath,
@@ -11636,7 +11642,12 @@ export function App({
.catch((error) => {
setPlanGddError(String(error));
})
.finally(() => setPlanGddDecisionBusy(false));
.finally(() => {
designAgentTurnRef.current = null;
setPlanningV2TransientReply('');
setChatAgentBusy(false);
setPlanGddDecisionBusy(false);
});
}
: undefined
}
@@ -61,7 +61,7 @@ export function DesignAgentSurface({
) : null}
</div>
{error ? <p className="design-agent-controls__error">{error}</p> : null}
{pending ? (
{pending && phase !== 'consultant' ? (
<div className="design-agent-approval">
<p></p>
<div>
@@ -19,6 +19,7 @@ const PHASES = [
['architecture', '系统架构'],
['systems', '系统文档'],
['tdd', '技术文档'],
['consultant', '顾问'],
] as const;
type DesignWorkspacePanelProps = {