修复策划 Agent 四个审查问题
修复 Retry 流式回合身份与阶段审批 transient 清理 拒绝无效 write_file 内容并补齐顾问阶段导轨
This commit is contained in:
@@ -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}")))
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user