diff --git a/src/cli/node.rs b/src/cli/node.rs index 1a0ec20..19b44a3 100644 --- a/src/cli/node.rs +++ b/src/cli/node.rs @@ -89,13 +89,6 @@ pub fn cmd_node_rename(old_key: &str, new_key: &str) -> Result<(), String> { Ok(()) } -/// Render a node to a string: content + deduped footer links. -/// Used by both the CLI command and agent placeholders. -pub fn render_node(store: &store::Store, key: &str) -> Option { - crate::hippocampus::memory::MemoryNode::from_store(store, key) - .map(|node| node.render()) -} - pub fn cmd_render(key: &[String]) -> Result<(), String> { if key.is_empty() { return Err("render requires a key".into()); @@ -300,4 +293,3 @@ pub fn cmd_lookups(date: Option<&str>) -> Result<(), String> { resolved.iter().map(|(_, c)| *c as u64).sum::()); Ok(()) } - diff --git a/src/hippocampus/memory.rs b/src/hippocampus/memory.rs index f6c3d58..4ec699f 100644 --- a/src/hippocampus/memory.rs +++ b/src/hippocampus/memory.rs @@ -91,3 +91,10 @@ impl MemoryNode { out } } + +/// Render a node to a string: content + deduped footer links. +/// Used by both the CLI command and agent placeholders. +pub fn render_node(store: &Store, key: &str) -> Option { + crate::hippocampus::memory::MemoryNode::from_store(store, key) + .map(|node| node.render()) +}