Skip to content

Commit 487754f

Browse files
feat(dashboard): Claude Code and Codex sessions on the cache page
New JSONL readers surface Claude Code (~/.claude/projects) and Codex (~/.codex/sessions) assistant usage as cache events. Codex semantics are normalized: its input_tokens include the cached portion (subtracted into our non-cached input field) and OpenAI implicit caching has no write signal, so the retention predictor gains a no-write variant driven by read-ratio only. Claude Code sidechain rows are excluded because they interleave separate conversations. Sessions from these harnesses are badged Managed when the MC Rust module holds durable state for them (mc_cache_state join, exact wire id or composite-key prefix); the cache page shows managed sessions by default with a persisted show-unmanaged toggle. OpenCode and Pi sessions are always shown (plugin-managed by definition). Co-authored-by: Alfonso [Magic Context] <288211368+alfonso-magic-context@users.noreply.github.com>
1 parent 72d652a commit 487754f

9 files changed

Lines changed: 1335 additions & 50 deletions

File tree

packages/dashboard/src-tauri/src/commands.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,11 @@ pub fn get_cache_events_from_db(
517517
}
518518

519519
#[tauri::command(async)]
520-
pub fn get_session_cache_stats_from_db(limit: Option<usize>) -> Vec<db::SessionCacheStats> {
521-
db::get_session_cache_stats_from_db(limit.unwrap_or(5))
520+
pub fn get_session_cache_stats_from_db(
521+
limit: Option<usize>,
522+
show_unmanaged: Option<bool>,
523+
) -> Vec<db::SessionCacheStats> {
524+
db::get_session_cache_stats_from_db(limit.unwrap_or(5), show_unmanaged.unwrap_or(false))
522525
}
523526

524527
// ── Config commands ─────────────────────────────────────────

0 commit comments

Comments
 (0)