commit 33db41182801f7845561e3ffef6ec9795d725afd
parent 1ff36fc8dbb2c7ad85cf4b7d1e4742dd5138191a
Author: William Casarin <jb55@jb55.com>
Date: Thu, 12 Feb 2026 14:04:06 -0800
dave: treat compaction as done state for session status
When compaction is the last message in chat, the session status
was falling through to Idle. Treat CompactionComplete the same
as Assistant for status derivation since compaction only happens
after the agent has done work.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/crates/notedeck_dave/src/session.rs b/crates/notedeck_dave/src/session.rs
@@ -277,7 +277,9 @@ impl ChatSession {
// Check if the last meaningful message was from assistant
for msg in self.chat.iter().rev() {
match msg {
- Message::Assistant(_) => return AgentStatus::Done,
+ Message::Assistant(_) | Message::CompactionComplete(_) => {
+ return AgentStatus::Done
+ }
Message::User(_) => return AgentStatus::Idle, // Waiting for response
Message::Error(_) => return AgentStatus::Error,
_ => continue,