Return next-step suggestions, filtering already-called tools.
(
tool_name: str, session: SessionState
)
| 303 | |
| 304 | |
| 305 | def _build_next_steps( |
| 306 | tool_name: str, session: SessionState |
| 307 | ) -> list[dict[str, str]]: |
| 308 | """Return next-step suggestions, filtering already-called tools.""" |
| 309 | called = set(session.tools_called) |
| 310 | candidates = _WORKFLOW.get(tool_name, []) |
| 311 | out: list[dict[str, str]] = [] |
| 312 | for c in candidates: |
| 313 | if c["tool"] not in called: |
| 314 | out.append(c) |
| 315 | return out |
| 316 | |
| 317 | |
| 318 | def _extract_warnings(result: dict[str, Any]) -> list[str]: |