(tool_name: &str, input: &serde_json::Value)
| 233 | } |
| 234 | |
| 235 | fn tool_requires_workspace_path(tool_name: &str, input: &serde_json::Value) -> bool { |
| 236 | match tool_name { |
| 237 | "Bash" => true, |
| 238 | "Glob" | "Grep" => input.get("path").is_none() || is_relative_path(input.get("path")), |
| 239 | "Read" | "Write" | "Edit" | "GetFileDiff" => is_relative_path(input.get("file_path")), |
| 240 | _ => false, |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | fn ensure_workspace_requirement( |
| 245 | tool_name: &str, |
no test coverage detected