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} 个字符" ));