From 19f3d62d784068d935bdc3b10af90d561266c8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 9 Sep 2026 00:42:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=94=E7=A6=BB=E9=9D=9E=E6=B3=95=E5=88=86?= =?UTF-8?q?=E7=A6=BB=E5=8C=BA=E5=9F=9F=E5=AF=BC=E8=87=B4=E7=9A=84=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=E5=A4=B1=E8=B4=A5=20=E5=B0=86=E8=A3=81=E5=88=87?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E8=AE=B0=E5=BD=95=E4=B8=BA=20problematic=20?= =?UTF-8?q?=E5=B9=B6=E7=BB=A7=E7=BB=AD=E6=B5=81=E7=A8=8B=20=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E5=8D=95=E4=B8=AA=E6=A8=A1=E5=9E=8B=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E7=BB=88=E6=AD=A2=E6=95=B4=E9=A1=B5=E5=88=86=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui_editor/commands/separation/workflow.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow.rs index 2d3cbb5ff..a17c07926 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow.rs @@ -380,6 +380,7 @@ pub(crate) async fn separate_ui_impl( } }; let mut cut_paths = std::collections::HashMap::new(); + let mut cut_error = None; for decision in &binding.decisions { if let BindingDecision::Ok { to_node, @@ -387,10 +388,24 @@ pub(crate) async fn separate_ui_impl( } = decision { let cut_path = sidecar.join(format!("cut-{}.png", to_node.as_str())); - cut_processed_image(&processed_path, separated_image_area, &cut_path)?; - cut_paths.insert(to_node.clone(), cut_path.to_string_lossy().to_string()); + match cut_processed_image(&processed_path, separated_image_area, &cut_path) { + Ok(()) => { + cut_paths + .insert(to_node.clone(), cut_path.to_string_lossy().to_string()); + } + Err(error) => { + cut_error = + Some(format!("节点 {} 的分离区域无效:{error}", to_node.as_str())); + break; + } + } } } + if let Some(error) = cut_error { + mark_batch_problematic(&mut separation, tree_index, &batch, error); + write_separation_state(&state_path, &separation)?; + continue; + } apply_batch_patch(&mut separation, tree_index, &binding.decisions, &cut_paths)?; write_separation_state(&state_path, &separation)?; }