Project a canonical Memory node to a rendered string. Kept as a separate entry (rather than a `Target::Memory` variant) so each `render*` stays typed to the node it can actually hold — `render` cannot receive a Memory it has no fields for, and this cannot receive an Intent. Same pure-projection contract: no second authoring site, and the status line is regenerated from the spine.
(node: &MemoryNode, target: Target)
| 34 | /// contract: no second authoring site, and the status line is regenerated from |
| 35 | /// the spine. |
| 36 | pub fn render_memory(node: &MemoryNode, target: Target) -> String { |
| 37 | match target { |
| 38 | Target::Cli => render_memory_cli(node), |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | fn render_cli(node: &CanonicalNode) -> String { |
| 43 | let mut root = Tree::new(format!("Intent {} — {}", node.human_key, node.title)); |