notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 4c5c4c7b68024246eac1f97d9ac084a765967aa6
parent 33db41182801f7845561e3ffef6ec9795d725afd
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 12 Feb 2026 14:04:23 -0800

dave: add debug logging for compact_boundary data

Log the raw data payload to diagnose why token count shows as 0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diffstat:
Mcrates/notedeck_dave/src/backend/claude.rs | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/crates/notedeck_dave/src/backend/claude.rs b/crates/notedeck_dave/src/backend/claude.rs @@ -30,9 +30,7 @@ use uuid::Uuid; fn tool_result_content_to_value(content: &Option<ToolResultContent>) -> serde_json::Value { match content { Some(ToolResultContent::Text(s)) => serde_json::Value::String(s.clone()), - Some(ToolResultContent::Blocks(blocks)) => { - serde_json::Value::Array(blocks.to_vec()) - } + Some(ToolResultContent::Blocks(blocks)) => serde_json::Value::Array(blocks.to_vec()), None => serde_json::Value::Null, } } @@ -525,6 +523,7 @@ async fn session_actor( // status: null means compaction finished (handled by compact_boundary) } else if system_msg.subtype == "compact_boundary" { // Compaction completed - extract token savings info + tracing::debug!("compact_boundary data: {:?}", system_msg.data); let pre_tokens = system_msg.data.get("pre_tokens") .and_then(|v| v.as_u64()) .unwrap_or(0);