From 86c268eca32c8943f2bed83bef154d3cf185fb27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 11 Sep 2026 21:54:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=A6=BB=E6=81=A2=E5=A4=8D=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=8B=AC=E7=AB=8B=E4=B8=A2=E5=BC=83=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增独立的恢复状态丢弃入口 完成与 finalize 的共享状态删除逻辑 --- apps/ai-game-creator-shell/src-tauri/src/main.rs | 2 +- .../src/ui_editor/commands/separation/persistence.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/main.rs b/apps/ai-game-creator-shell/src-tauri/src/main.rs index b8096e5d1..1fb7e138b 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/main.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/main.rs @@ -353,7 +353,7 @@ fn inspect_separation_recovery( fn finalize_separation(project_path: String, asset_id: String) -> Result<(), String> { let root = Path::new(project_path.trim()); enforce_project_permission_policy(root, "asset.register")?; - ui_editor::commands::separation::finalize_separation(root, &asset_id) + ui_editor::commands::separation::discard_separation_recovery(root, &asset_id) } #[tauri::command] diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/persistence.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/persistence.rs index 05a4ed683..5b663c609 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/persistence.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/persistence.rs @@ -187,6 +187,14 @@ pub fn inspect_separation_recovery( } pub fn finalize_separation(root: &Path, asset_id: &str) -> Result<(), String> { + remove_separation_state(root, asset_id) +} + +pub fn discard_separation_recovery(root: &Path, asset_id: &str) -> Result<(), String> { + remove_separation_state(root, asset_id) +} + +fn remove_separation_state(root: &Path, asset_id: &str) -> Result<(), String> { let state_path = separation_state_path(root, asset_id)?; match fs::remove_file(&state_path) { Ok(()) => Ok(()),