memory_render: default to no links footer
Links clutter context windows. Use memory_links() to see links. Pass raw=false explicitly if you want the footer. Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
82eeb9807e
commit
e847a313b4
1 changed files with 2 additions and 1 deletions
|
|
@ -9,7 +9,8 @@ use crate::neuro::{consolidation_priority, ReplayItem};
|
||||||
pub fn memory_render(store: &Store, _provenance: &str, key: &str, raw: Option<bool>) -> Result<String> {
|
pub fn memory_render(store: &Store, _provenance: &str, key: &str, raw: Option<bool>) -> Result<String> {
|
||||||
let node = MemoryNode::from_store(store, key)
|
let node = MemoryNode::from_store(store, key)
|
||||||
.ok_or_else(|| anyhow::anyhow!("node not found: {}", key))?;
|
.ok_or_else(|| anyhow::anyhow!("node not found: {}", key))?;
|
||||||
if raw.unwrap_or(false) {
|
// Default to raw (no links footer) - use memory_links() for links
|
||||||
|
if raw.unwrap_or(true) {
|
||||||
Ok(node.content)
|
Ok(node.content)
|
||||||
} else {
|
} else {
|
||||||
Ok(node.render())
|
Ok(node.render())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue