diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/mod.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/mod.rs index 181964feb..ffa1092da 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/mod.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/mod.rs @@ -20,6 +20,7 @@ use std::collections::HashMap; use std::fs; use std::path::Path; use std::time::Instant; +use uuid::Uuid; pub(crate) async fn separate_ui_impl( project_path: String, @@ -205,13 +206,7 @@ pub(crate) async fn separate_ui_impl( } = decision { let node_id = to_node.as_str(); - if !node_id.chars().all(|character| { - character.is_ascii_alphanumeric() || matches!(character, '-' | '_') - }) { - cut_error = Some(format!("节点 {} 的名称包含非法路径字符", node_id)); - break; - } - let cut_path = sidecar.join(format!("cut-{node_id}.png")); + let cut_path = sidecar.join(format!("cut-{}.png", Uuid::new_v4())); if !cut_path.starts_with(&sidecar) { cut_error = Some(format!("节点 {} 的路径越界", node_id)); break;