Fallback heuristic: commands likely to take > 30s.
(tool_name: str, tool_input: dict)
| 263 | |
| 264 | |
| 265 | def is_slow_operation(tool_name: str, tool_input: dict) -> bool: |
| 266 | """Fallback heuristic: commands likely to take > 30s.""" |
| 267 | if tool_name != "bash": |
| 268 | return False |
| 269 | cmd = tool_input.get("command", "").lower() |
| 270 | slow_keywords = ["install", "build", "test", "deploy", "compile", |
| 271 | "docker build", "pip install", "npm install", |
| 272 | "cargo build", "pytest", "make"] |
| 273 | return any(kw in cmd for kw in slow_keywords) |
| 274 | |
| 275 | |
| 276 | def should_run_background(tool_name: str, tool_input: dict) -> bool: |
no test coverage detected