(value: Any)
| 362 | |
| 363 | |
| 364 | def _content_text(value: Any) -> str: |
| 365 | if isinstance(value, str): |
| 366 | return value |
| 367 | if isinstance(value, list): |
| 368 | parts: list[str] = [] |
| 369 | for item in value: |
| 370 | if isinstance(item, dict) and item.get("type") in {"text", "input_text"}: |
| 371 | parts.append(str(item.get("text", ""))) |
| 372 | return "\n".join(part for part in parts if part) |
| 373 | return str(value or "") |
| 374 | |
| 375 | |
| 376 | def _looks_like_wrapper_text(text: str) -> bool: |
no test coverage detected