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

Function build_new_section

atomic-agent/src/learnings.rs:484–499  ·  view source on GitHub ↗

Build a complete new learnings section (heading + markers + content).

(learnings_markdown: &str)

Source from the content-addressed store, hash-verified

482
483/// Build a complete new learnings section (heading + markers + content).
484fn build_new_section(learnings_markdown: &str) -> String {
485 let mut section = String::new();
486 section.push_str(SECTION_HEADING);
487 section.push('\n');
488 section.push('\n');
489 section.push_str(SECTION_NOTE);
490 section.push('\n');
491 section.push('\n');
492 section.push_str(SECTION_START);
493 section.push('\n');
494 section.push('\n');
495 section.push_str(learnings_markdown);
496 section.push_str(SECTION_END);
497 section.push('\n');
498 section
499}
500
501/// Collect new learnings as heading → items map for merging.
502fn collect_new_items(learnings: &Learnings) -> HashMap<String, Vec<String>> {

Callers 2

test_build_new_sectionFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by 1

test_build_new_sectionFunction · 0.68