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)