Extracts the text content from a `ToolResult` value (the standard `content[0].text` envelope).
(value: &Value)
| 723 | /// Extracts the text content from a `ToolResult` value (the standard |
| 724 | /// `content[0].text` envelope). |
| 725 | fn extract_text(value: &Value) -> &str { |
| 726 | value["content"][0]["text"] |
| 727 | .as_str() |
| 728 | .unwrap_or("<missing text>") |
| 729 | } |
| 730 | |
| 731 | fn extract_json(value: &Value) -> Value { |
| 732 | serde_json::from_str(extract_text(value)).unwrap() |
no test coverage detected