From 529a1a0a77f54ee260ed3d553db598fb62e5b74e Mon Sep 17 00:00:00 2001 From: suzmii Date: Wed, 2 Sep 2026 14:27:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=20AGC=20Agent=20?= =?UTF-8?q?=E6=97=A2=E6=9C=89=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正 generation 与 runtime_state 两个文件的 rustfmt 布局,使工作区格式门禁可通过。 --- .../src-tauri/src/agent/generation.rs | 3 +-- .../src-tauri/src/agent/runtime_state.rs | 24 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/generation.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/generation.rs index 11fb9e900..f9c5a4ab3 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/generation.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/generation.rs @@ -24,8 +24,7 @@ pub(crate) use canvas_generation::{ ExternalGenerationInitialResponse, }; pub(in crate::agent) use canvas_generation::{ - commit_prepared_platform_art_asset_at, - commit_prepared_platform_art_asset_strict_slices_at, + commit_prepared_platform_art_asset_at, commit_prepared_platform_art_asset_strict_slices_at, generate_platform_art_asset_with_retained_runtime_options_at, generate_platform_art_asset_with_runtime_options_at, platform_art_generation_error_result_unknown, register_existing_platform_art_slices_at, diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_state.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_state.rs index ff040770c..938f4f82e 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_state.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_state.rs @@ -3343,18 +3343,18 @@ fn append_unique_game_creator_agent_runtime_task_with_initial_state( // strict/legacy profiles preserves their existing recovery behavior. if !autonomous_relaxed_run_profile(&record.run_profile) { if let Err(error) = ensure_autonomous_completion_contract_for_task_at(root, &record) { - let public_error = redact_agent_runtime_project_paths(root, &error, 500); - let failed = AgentRuntimeTaskRecord { - status: "failed".to_string(), - phase: "completion-contract-failed".to_string(), - current_action: "自主构建完成合同未能建立,任务未执行".to_string(), - terminal_detail: Some(public_error.clone()), - error: Some(public_error), - updated_at: unix_timestamp(), - ..record.clone() - }; - append_game_creator_agent_runtime_task_record_unlocked(root, &failed)?; - return Err(format!("自主构建完成合同建立失败,任务未执行:{error}")); + let public_error = redact_agent_runtime_project_paths(root, &error, 500); + let failed = AgentRuntimeTaskRecord { + status: "failed".to_string(), + phase: "completion-contract-failed".to_string(), + current_action: "自主构建完成合同未能建立,任务未执行".to_string(), + terminal_detail: Some(public_error.clone()), + error: Some(public_error), + updated_at: unix_timestamp(), + ..record.clone() + }; + append_game_creator_agent_runtime_task_record_unlocked(root, &failed)?; + return Err(format!("自主构建完成合同建立失败,任务未执行:{error}")); } } Ok(record)