Display memory scores in status column

Move score display from name (via label()) to status column for cleaner
layout. Score now appears right of tokens for all memory nodes.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-15 06:08:27 -04:00
parent 7046e63b9d
commit 4603947506
2 changed files with 20 additions and 11 deletions

View file

@ -37,14 +37,14 @@ impl ConsciousScreen {
let mut unscored = 0usize;
for node in ctx.conversation() {
if let AstNode::Leaf(leaf) = node {
if let NodeBody::Memory { score, text, .. } = leaf.body() {
if let NodeBody::Memory { key, score, text } = leaf.body() {
if score.is_some() { scored += 1; } else { unscored += 1; }
mem_children.push(SectionView {
name: node.label(),
name: format!("mem: {}", key),
tokens: node.tokens(),
content: text.clone(),
children: Vec::new(),
status: String::new(),
status: score.map(|s| format!("{:.2}", s)).unwrap_or_default(),
});
}
}