Fallback heuristic: commands likely to take > 30s.
(tool_name: str, tool_input: dict)
| 316 | |
| 317 | |
| 318 | def is_slow_operation(tool_name: str, tool_input: dict) -> bool: |
| 319 | """Fallback heuristic: commands likely to take > 30s.""" |
| 320 | if tool_name != "bash": |
| 321 | return False |
| 322 | cmd = tool_input.get("command", "").lower() |
| 323 | slow_keywords = ["install", "build", "test", "deploy", "compile", |
| 324 | "docker build", "pip install", "npm install", |
| 325 | "cargo build", "pytest", "make"] |
| 326 | return any(kw in cmd for kw in slow_keywords) |
| 327 | |
| 328 | |
| 329 | def should_run_background(tool_name: str, tool_input: dict) -> bool: |
no test coverage detected