From c5c7339c4a55bfef7842f83a4b76327e38ecfe53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 10 Sep 2026 18:54:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E5=88=86=E7=A6=BB?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=20`problem=5Fdescription`=20=E4=B8=BA=20`adv?= =?UTF-8?q?ice`=20=E5=B9=B6=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=96=B0=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91=E4=B8=8E=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src-tauri/src/ui_editor/commands/separation/mod.rs | 4 ++-- .../src/ui_editor/commands/separation/model/binding.rs | 2 +- .../src-tauri/src/ui_editor/commands/separation/tree.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 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 4dadea3a6..fa3cc23d2 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 @@ -230,7 +230,7 @@ mod tests { 0, &[BindingDecision::NeedRework { to_node: id.clone(), - problem_description: note.to_string(), + advice: note.to_string(), }], &paths, ) @@ -276,7 +276,7 @@ mod tests { }; let decision = BindingDecision::NeedRework { to_node: node.id.clone(), - problem_description: "x".repeat(MAX_REWORK_NOTE_CHARS + 1), + advice: "x".repeat(MAX_REWORK_NOTE_CHARS + 1), }; assert!(validate_binding_response( &BindingResp { diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/binding.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/binding.rs index c21b4388d..d24f249eb 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/binding.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/binding.rs @@ -39,7 +39,7 @@ pub enum BindingDecision { to_node: NodeId, }, NeedRework { - problem_description: String, + advice: String, to_node: NodeId, }, } diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/tree.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/tree.rs index 6cd9e2be3..6e942e260 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/tree.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/tree.rs @@ -252,14 +252,14 @@ pub fn validate_binding_response( return Err(format!("视觉绑定重复返回节点:{}", node_id.as_str())); } if let BindingDecision::NeedRework { - problem_description, + advice, .. } = decision { - if problem_description.trim().is_empty() { + if advice.trim().is_empty() { return Err("NeedRework 必须包含问题描述".to_string()); } - if problem_description.chars().count() > MAX_REWORK_NOTE_CHARS { + if advice.chars().count() > MAX_REWORK_NOTE_CHARS { return Err(format!( "NeedRework 问题描述不能超过 {MAX_REWORK_NOTE_CHARS} 个字符" ));