diff --git a/src-tauri/src/commands/memory.rs b/src-tauri/src/commands/memory.rs index dc46bf1..837fa8f 100644 --- a/src-tauri/src/commands/memory.rs +++ b/src-tauri/src/commands/memory.rs @@ -20,7 +20,13 @@ async fn agent_workspace(agent_id: &str) -> Result { .args(["agents", "list", "--json"]) .output() .await - .map_err(|e| format!("执行 openclaw 失败: {e}"))?; + .map_err(|e| { + if e.kind() == std::io::ErrorKind::NotFound { + "OpenClaw CLI 未找到,请确认已安装并重启 ClawPanel。\n如果使用 nvm 安装,请从终端启动 ClawPanel。".to_string() + } else { + format!("执行 openclaw 失败: {e}") + } + })?; if !output.status.success() { return Err("获取 Agent 列表失败".into());