(response: &Value)
| 550 | } |
| 551 | |
| 552 | fn extract_tool_status(response: &Value) -> Option<String> { |
| 553 | if response |
| 554 | .get("success") |
| 555 | .and_then(Value::as_bool) |
| 556 | .is_some_and(|success| success) |
| 557 | { |
| 558 | return Some("completed".to_string()); |
| 559 | } |
| 560 | if response |
| 561 | .get("success") |
| 562 | .and_then(Value::as_bool) |
| 563 | .is_some_and(|success| !success) |
| 564 | || response.get("error").is_some() |
| 565 | { |
| 566 | return Some("error".to_string()); |
| 567 | } |
| 568 | None |
| 569 | } |
| 570 | |
| 571 | fn extract_duration_ms(response: &Value) -> Option<u64> { |
| 572 | response |
no test coverage detected