fix(agent): show Compacting state during in-flight operator /compact

This commit is contained in:
müde 2026-07-05 22:54:20 +02:00
commit 746f518250

View file

@ -346,6 +346,9 @@ pub async fn drive_turn(
bus.emit(LiveEvent::Note {
text: "operator: /compact — running at turn end".into(),
});
// Reflect `Compacting` in the UI like the idle path (`run_pending_compact`)
// does; the serve loop resets to `Idle` once this turn returns.
bus.set_state(crate::events::TurnState::Compacting);
let _ = session.compact(&config, &sink).await;
return Ok(true);
}