(item: dict[str, Any])
| 441 | |
| 442 | |
| 443 | def extract_user_text(item: dict[str, Any]) -> str: |
| 444 | content = item.get("content") |
| 445 | if isinstance(content, str): |
| 446 | return content |
| 447 | if isinstance(content, list): |
| 448 | return "".join( |
| 449 | part.get("text", "") |
| 450 | for part in content |
| 451 | if isinstance(part, dict) and part.get("type") == "input_text" |
| 452 | ) |
| 453 | return "" |
| 454 | |
| 455 | |
| 456 | def extract_call_id(item: Any) -> str | None: |
no test coverage detected