From aa2a78f7e08300a5bca5c71da7defc872527de13 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 15:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20separated=5Fimage?= =?UTF-8?q?=5Farea=20=E4=B8=BA=20extracted=5Farea=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=91=BD=E5=90=8D=E4=B8=80=E8=87=B4=E6=80=A7=E5=B9=B6?= =?UTF-8?q?=E6=98=8E=E7=A1=AE=E5=8C=BA=E5=9F=9F=E5=90=AB=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src-tauri/src/ui_editor/commands/separation/mod.rs | 2 +- .../src-tauri/src/ui_editor/commands/separation/model.rs | 2 +- .../src-tauri/src/ui_editor/commands/separation/prompt.rs | 4 +++- .../src-tauri/src/ui_editor/commands/separation/workflow.rs | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/mod.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/mod.rs index 179dfdd6f..7f86ff6f6 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/mod.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/mod.rs @@ -145,7 +145,7 @@ mod tests { let id = NodeId::new("image").unwrap(); let decisions = vec![BindingDecision::Ok { to_node: id.clone(), - separated_image_area: BindingArea { + extracted_area: BindingArea { global_pos_x_px: 0, global_pos_y_px: 0, width_px: 1, diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model.rs index a9a026b6a..85773a411 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model.rs @@ -110,7 +110,7 @@ impl BindingArea { #[schemars(deny_unknown_fields)] pub enum BindingDecision { Ok { - separated_image_area: BindingArea, + extracted_area: BindingArea, to_node: NodeId, }, NeedRework { diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/prompt.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/prompt.rs index 3343ae1dc..7781b6bf0 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/prompt.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/prompt.rs @@ -37,7 +37,9 @@ pub(super) fn gen_binding_prompt(nodes: Vec<&SeparationNode>) -> String { ``` {SHARED_SEPARATION_REQ} ``` - You need to recognize and review the separation: + You need to recognize and review the separation using the given tool. + field notes: + * extracted_area MUST be the recognized area from the processed image, INSTEAD OF from the src image. these node need handle: "# 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 e6ff0cbfc..506f291af 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 @@ -512,7 +512,7 @@ pub(crate) async fn separate_ui_impl( for decision in &binding.decisions { if let BindingDecision::Ok { to_node, - separated_image_area, + extracted_area: separated_image_area, } = decision { let cut_path = sidecar.join(format!("cut-{}.png", to_node.as_str()));