Model explicit request takes priority; fallback to heuristic.
(tool_name: str, tool_input: dict)
| 278 | |
| 279 | |
| 280 | def should_run_background(tool_name: str, tool_input: dict) -> bool: |
| 281 | """Model explicit request takes priority; fallback to heuristic.""" |
| 282 | if tool_input.get("run_in_background"): |
| 283 | return True |
| 284 | return is_slow_operation(tool_name, tool_input) |
| 285 | |
| 286 | |
| 287 | def start_background_task(block) -> str: |
no test coverage detected