MCPcopy Create free account
hub / github.com/GCWing/BitFun / summarize_command_output

Function summarize_command_output

src/apps/desktop/src/api/skill_api.rs:1183–1195  ·  view source on GitHub ↗
(stdout: &str, stderr: &str)

Source from the content-addressed store, hash-verified

1181}
1182
1183fn summarize_command_output(stdout: &str, stderr: &str) -> String {
1184 let primary = if !stdout.trim().is_empty() {
1185 stdout.trim()
1186 } else {
1187 stderr.trim()
1188 };
1189
1190 if primary.is_empty() {
1191 return "Skill downloaded successfully.".to_string();
1192 }
1193
1194 truncate_preview(primary)
1195}
1196
1197fn truncate_preview(text: &str) -> String {
1198 if text.chars().count() <= MAX_OUTPUT_PREVIEW_CHARS {

Callers 1

download_skill_marketFunction · 0.85

Calls 3

trimMethod · 0.80
truncate_previewFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected