diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/cocos_execute/error.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/cocos_execute/error.rs index b0146f279..48a074da7 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/tool/cocos_execute/error.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/tool/cocos_execute/error.rs @@ -66,7 +66,7 @@ impl ToolFailure for CocosExecuteError { format!("Cocos 参数无效:{cause}") } Self::CodeNotText => "code 必须是 JavaScript 函数体。".to_string(), - Self::CodeInvalid { cause } => cause.to_string(), + Self::CodeInvalid { cause } => cause.clone(), Self::ExecutionBusy => { "已有 Cocos 操作执行中,请等待回执;本次调用没有发送执行命令,也不要重放。" .to_string()