(tool_name: &str, tool_input: Option<&serde_json::Value>)
| 589 | } |
| 590 | |
| 591 | fn summarize_execution(tool_name: &str, tool_input: Option<&serde_json::Value>) -> String { |
| 592 | // For shell commands, show the command |
| 593 | let normalized = tool_name.to_lowercase(); |
| 594 | if matches!( |
| 595 | normalized.as_str(), |
| 596 | "bash" | "terminal" | "shell" | "command" | "exec" | "run" |
| 597 | ) { |
| 598 | let cmd = extract_command(tool_input); |
| 599 | let cmd = cmd.trim(); |
| 600 | if !cmd.is_empty() { |
| 601 | return truncate_for_summary(cmd, 300); |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | format!("Execute {}", tool_name) |
| 606 | } |
| 607 | |
| 608 | /// Truncate a string for summary display, adding "..." if truncated. |
| 609 | fn truncate_for_summary(s: &str, max_len: usize) -> String { |
no test coverage detected