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

Function truncate_preview

src/apps/desktop/src/api/skill_api.rs:1197–1204  ·  view source on GitHub ↗
(text: &str)

Source from the content-addressed store, hash-verified

1195}
1196
1197fn truncate_preview(text: &str) -> String {
1198 if text.chars().count() <= MAX_OUTPUT_PREVIEW_CHARS {
1199 return text.to_string();
1200 }
1201
1202 let truncated: String = text.chars().take(MAX_OUTPUT_PREVIEW_CHARS).collect();
1203 format!("{}...", truncated)
1204}
1205
1206fn market_description_cache() -> &'static RwLock<HashMap<String, String>> {
1207 MARKET_DESCRIPTION_CACHE.get_or_init(|| RwLock::new(HashMap::new()))

Callers 2

download_skill_marketFunction · 0.70
summarize_command_outputFunction · 0.70

Calls 3

collectMethod · 0.80
takeMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected