MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / summarize_execution

Function summarize_execution

atomic-agent/src/provenance/classify.rs:750–765  ·  view source on GitHub ↗
(tool_name: &str, tool_input: Option<&serde_json::Value>)

Source from the content-addressed store, hash-verified

748}
749
750fn 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.
768fn truncate_for_summary(s: &str, max_len: usize) -> String {

Callers 1

summarize_tool_callFunction · 0.85

Calls 3

truncate_for_summaryFunction · 0.85
extract_commandFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected