Check if a code block language indicates shell/bash content. Args: lang: The language specifier from the code block (e.g., "bash", "sh"). Returns: True if the language is a shell-like language or unspecified.
(self, lang: Optional[str])
| 174 | return raw_bash_block, inline_calls |
| 175 | |
| 176 | def _is_shell_block(self, lang: Optional[str]) -> bool: |
| 177 | """Check if a code block language indicates shell/bash content. |
| 178 | |
| 179 | Args: |
| 180 | lang: The language specifier from the code block (e.g., "bash", "sh"). |
| 181 | |
| 182 | Returns: |
| 183 | True if the language is a shell-like language or unspecified. |
| 184 | """ |
| 185 | return not lang or lang.strip().lower() in SHELL_BLOCK_LANGS |
| 186 | |
| 187 | def _looks_like_tool_call(self, content: str) -> bool: |
| 188 | """Check if content looks like a function/tool call. |
no outgoing calls