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

Function memory_path_to_node_id

atomic-cli/src/commands/vault/context.rs:672–678  ·  view source on GitHub ↗

`memory/architecture.md` -> `memory:architecture`.

(project: &ProjectId, path: &str)

Source from the content-addressed store, hash-verified

670
671/// `memory/architecture.md` -> `memory:architecture`.
672fn memory_path_to_node_id(project: &ProjectId, path: &str) -> Option<String> {
673 let name = path.strip_prefix("memory/")?.strip_suffix(".md")?;
674 if name.is_empty() {
675 return None;
676 }
677 Some(iri::mint_memory(project, name))
678}
679
680// Frontmatter helpers
681

Callers 2

gather_candidatesMethod · 0.70
scan_memory_bodiesMethod · 0.70

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected