Kill StatusUpdate, Activity, DmnAnnotation, ContextInfoUpdate, AgentUpdate
Status bar reads directly from Agent and MindState on each render tick. Activity is now a field on Agent — set by agent code directly, read by UI via try_lock. DmnAnnotation, ContextInfoUpdate, AgentUpdate were already dead (no senders). UiMessage down to 4 variants: TextDelta, Reasoning, Debug, Info. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
1745e03550
commit
eafc2887a3
7 changed files with 32 additions and 76 deletions
|
|
@ -317,6 +317,7 @@ pub async fn score_memories_incremental(
|
|||
response_window: usize,
|
||||
client: &ApiClient,
|
||||
ui_tx: &UiSender,
|
||||
agent: &std::sync::Arc<tokio::sync::Mutex<crate::agent::Agent>>,
|
||||
) -> anyhow::Result<Vec<(String, f64)>> {
|
||||
let now = chrono::Utc::now().timestamp();
|
||||
|
||||
|
|
@ -359,7 +360,7 @@ pub async fn score_memories_incremental(
|
|||
continue;
|
||||
}
|
||||
|
||||
let _ = ui_tx.send(UiMessage::Activity(format!("scoring memory: {}...", key)));
|
||||
if let Ok(mut ag) = agent.try_lock() { ag.activity = format!("scoring memory: {}...", key); }
|
||||
match score_divergence(&http, client, context, range, Filter::SkipKey(key)).await {
|
||||
Ok((divs, _)) => {
|
||||
let n_responses = divs.len();
|
||||
|
|
@ -378,7 +379,7 @@ pub async fn score_memories_incremental(
|
|||
}
|
||||
}
|
||||
|
||||
let _ = ui_tx.send(UiMessage::Activity(String::new()));
|
||||
if let Ok(mut ag) = agent.try_lock() { ag.activity.clear(); }
|
||||
Ok(results)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue