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

Function build_new_section

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

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

(learnings_markdown: &str)

Source from the content-addressed store, hash-verified

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