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

Function frontmatter_memory_id

atomic-cli/src/commands/vault/context.rs:638–645  ·  view source on GitHub ↗
(frontmatter_json: &str)

Source from the content-addressed store, hash-verified

636}
637
638fn frontmatter_memory_id(frontmatter_json: &str) -> Option<String> {
639 let id = frontmatter_string(frontmatter_json, &["@id", "uid", "id"])?;
640 if id.starts_with("urn:atomic:") {
641 Some(id)
642 } else {
643 Some(format!("urn:atomic:memory:{id}"))
644 }
645}
646
647fn frontmatter_string(frontmatter_json: &str, keys: &[&str]) -> Option<String> {
648 let value = serde_json::from_str::<serde_json::Value>(frontmatter_json).ok()?;

Callers 1

resolve_and_rankFunction · 0.85

Calls 1

frontmatter_stringFunction · 0.85

Tested by

no test coverage detected