(tool_name: &str, tool_input: Option<&serde_json::Value>)
| 748 | } |
| 749 | |
| 750 | fn summarize_execution(tool_name: &str, tool_input: Option<&serde_json::Value>) -> String { |
| 751 | // For shell commands, show the command |
| 752 | let normalized = tool_name.to_lowercase(); |
| 753 | if matches!( |
| 754 | normalized.as_str(), |
| 755 | "bash" | "terminal" | "shell" | "command" | "exec" | "run" |
| 756 | ) { |
| 757 | let cmd = extract_command(tool_input); |
| 758 | let cmd = cmd.trim(); |
| 759 | if !cmd.is_empty() { |
| 760 | return truncate_for_summary(cmd, 300); |
| 761 | } |
| 762 | } |
| 763 | |
| 764 | format!("Execute {}", tool_name) |
| 765 | } |
| 766 | |
| 767 | /// Truncate a string for summary display, adding "..." if truncated. |
| 768 | fn truncate_for_summary(s: &str, max_len: usize) -> String { |
no test coverage detected