(
tool_input: Option<&serde_json::Value>,
tool_output: Option<&str>,
status: Option<&str>,
)
| 550 | } |
| 551 | |
| 552 | fn summarize_verification( |
| 553 | tool_input: Option<&serde_json::Value>, |
| 554 | tool_output: Option<&str>, |
| 555 | status: Option<&str>, |
| 556 | ) -> String { |
| 557 | let cmd = extract_command(tool_input); |
| 558 | let cmd = cmd.trim(); |
| 559 | |
| 560 | let passed = infer_verification_passed(tool_input, tool_output, status); |
| 561 | |
| 562 | let result_suffix = match passed { |
| 563 | Some(true) => " (passed)", |
| 564 | Some(false) => " (failed)", |
| 565 | None => "", |
| 566 | }; |
| 567 | |
| 568 | if cmd.is_empty() { |
| 569 | format!("Run verification{}", result_suffix) |
| 570 | } else { |
| 571 | format!("{}{}", truncate_for_summary(cmd, 300), result_suffix) |
| 572 | } |
| 573 | } |
| 574 | |
| 575 | /// Infer whether a verification command passed. |
| 576 | /// |
no test coverage detected