MCPcopy Create free account
hub / github.com/Louisym/MiniCC / format_compact_summary

Function format_compact_summary

rust/crates/runtime/src/compact.rs:38–50  ·  view source on GitHub ↗
(summary: &str)

Source from the content-addressed store, hash-verified

36
37#[must_use]
38pub fn format_compact_summary(summary: &str) -> String {
39 let without_analysis = strip_tag_block(summary, "analysis");
40 let formatted = if let Some(content) = extract_tag_block(&without_analysis, "summary") {
41 without_analysis.replace(
42 &format!("<summary>{content}</summary>"),
43 &format!("Summary:\n{}", content.trim()),
44 )
45 } else {
46 without_analysis
47 };
48
49 collapse_blank_lines(&formatted).trim().to_string()
50}
51
52#[must_use]
53pub fn get_compact_continuation_message(

Callers 1

compact_sessionFunction · 0.70

Calls 3

strip_tag_blockFunction · 0.70
extract_tag_blockFunction · 0.70
collapse_blank_linesFunction · 0.70

Tested by

no test coverage detected