(
tool_name: &str,
input: &serde_json::Value,
workspace_path: Option<&str>,
)
| 242 | } |
| 243 | |
| 244 | fn ensure_workspace_requirement( |
| 245 | tool_name: &str, |
| 246 | input: &serde_json::Value, |
| 247 | workspace_path: Option<&str>, |
| 248 | ) -> Result<(), String> { |
| 249 | if tool_requires_workspace_path(tool_name, input) |
| 250 | && !has_explicit_workspace_path(workspace_path) |
| 251 | { |
| 252 | return Err(format!( |
| 253 | "workspacePath is required to execute tool '{}' with workspace-relative input", |
| 254 | tool_name |
| 255 | )); |
| 256 | } |
| 257 | |
| 258 | Ok(()) |
| 259 | } |
| 260 | |
| 261 | #[tauri::command] |
| 262 | pub async fn get_all_tools_info() -> Result<Vec<ToolInfo>, String> { |
no test coverage detected