Memory scores on entries, not a separate Vec

ConversationEntry::Memory gains score: Option<f64>. The scorer
writes scores directly onto entries when results arrive. Removes
Agent.memory_scores Vec and the memory_scores parameter from
context_state_summary().

Scores are serialized to/from the conversation log as memory_score.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-07 03:14:24 -04:00
parent 93f5f8b0c7
commit 39dcf27bd0
6 changed files with 36 additions and 50 deletions

View file

@ -863,7 +863,7 @@ impl ScreenView for InteractScreen {
agent.expire_activities();
app.status.prompt_tokens = agent.last_prompt_tokens();
app.status.model = agent.model().to_string();
let sections = agent.context_state_summary(None);
let sections = agent.context_state_summary();
app.status.context_budget = crate::agent::context::sections_budget_string(&sections);
app.activity = agent.activities.last()
.map(|a| a.label.clone())

View file

@ -29,7 +29,7 @@ impl ConsciousScreen {
fn read_context_state(&self) -> Vec<ContextSection> {
match self.agent.try_lock() {
Ok(ag) => ag.context_state_summary(None),
Ok(ag) => ag.context_state_summary(),
Err(_) => Vec::new(),
}
}