diff --git a/README.md b/README.md index 1f042d2..d223fab 100644 --- a/README.md +++ b/README.md @@ -308,13 +308,15 @@ from `ui-token` on every API call, rejects requests whose `Host` is not - Claude Code has no "closed" state for interactive sessions (they vanish once their process ends) and leaves a finished background session as `done` after `claude stop`. `closed.json` is what keeps both listed as closed. -- History is read from `/projects//.jsonl`, top level only, - read-only. Artifacts are the links Claude Code records there when a conversation - publishes or opens one. +- History is read from `/projects//.jsonl`, read-only. + Artifacts are the links Claude Code records there when a conversation publishes or + opens one. Sub-agents' conversations, under `//subagents/`, are not + listed as sessions of their own. - Token counts come from the usage Claude Code records on each reply in those files. A - reply written over several lines is counted once. Sub-agents keep conversations of their - own, which are not counted, and days older than an account's `cleanupPeriodDays` are - empty because Claude Code has deleted them. + reply written over several lines is counted once (Claude Code's own `/stats` counts it + once per line, so its totals come out higher). A sub-agent's replies count with the + session that started it. Days older than an account's `cleanupPeriodDays` are empty + because Claude Code has deleted them. ### Codex diff --git a/ui/app.js b/ui/app.js index 5222fb3..ae78b7c 100644 --- a/ui/app.js +++ b/ui/app.js @@ -938,10 +938,11 @@ function renderSessions() { : h('span', { class: 'count' }, String(entries.length))), entries.map((e) => entryRow(e, folderOf(e), hits.get(e.key)))); }), - (hiddenEmpty > 0 || shownEmpty > 0) && h('p', { class: 'list-more' }, + // replaceChildren writes out a false as text, so nothing is an empty string here. + hiddenEmpty > 0 || shownEmpty > 0 ? h('p', { class: 'list-more' }, h('button', { type: 'button', class: 'btn-link', onclick: () => { state.showEmpty = !state.showEmpty; render(); } }, icon('eye'), state.showEmpty ? 'Hide empty conversations' : `Show ${plural(hiddenEmpty, 'empty conversation')}`), - h('span', { class: 'quiet' }, ' Opened and never used: no prompts.')), + h('span', { class: 'quiet' }, ' Opened and never used: no prompts.')) : '', h('p', { class: 'quiet list-note' }, reading ? 'Reading saved conversations…' : (activeAccounts().some((a) => a.tool === 'claude') ? `Claude Code itself deletes conversations after ${span} days without activity ` + '(its cleanupPeriodDays setting, shown per account under Accounts). ' : '') + diff --git a/ui/concept.js b/ui/concept.js index 39aac1f..b64ac60 100644 --- a/ui/concept.js +++ b/ui/concept.js @@ -865,7 +865,7 @@ function usageView() { h('div', { class: 'usage-row' }, hourMap(week), breakdown('By account', [...perAccount.entries()], (name) => accountColor(name))), h('div', { class: 'usage-row' }, breakdown('By model', [...perModel.entries()]), topSessions(chosen)), h('p', { class: 'usage-note' }, - 'Counted from each reply in the conversations Claude Code and Codex keep on this computer. Work done by sub-agents is in conversations of its own and is not counted here. ', + 'Counted from each reply in the conversations Claude Code and Codex keep on this computer. Each reply counts once, however many lines it is written over, and a Claude Code sub-agent\'s replies count with the session that started it. ', 'Claude Code deletes conversations after their account\'s cleanupPeriodDays (30 days unless changed), so older days are empty. Codex keeps them until they are deleted.')); }