Commit graph

28 commits

Author SHA1 Message Date
AgentSeal
51c56d0726 fix: include agent/subagent sessions, fix Codex cache hit and cost calculation
- Remove agent-*.jsonl exclusion filter that was dropping ~46% of API calls
- Scan subagents/ directories for subagent session files
- Normalize Codex token semantics: OpenAI includes cached tokens inside
  input_tokens, subtract them to match Anthropic's separate reporting
- Fixes cost double-counting and 100% cache hit display for Codex users
2026-04-14 10:18:14 -07:00
AgentSeal
ce2c1d2995 Merge branch 'fix/csv-formula-injection' 2026-04-14 09:39:03 -07:00
AgentSeal
16f39e264e feat: responsive dashboard — dynamic reflow, wider cap, half-width panels
- Use Ink's useWindowSize() hook for reactive terminal reflow (PR #18)
- Raise width cap from 104 to 160 columns for wide screens
- Move Activity panel from full-width to half-width row with Model panel
- Pair Tool + Bash panels, MCP goes full-width at bottom
- Addresses issue #23 (UI responsiveness)
2026-04-14 09:15:37 -07:00
AgentSeal
d2560d7ad8 bump to 0.4.1: multi-currency support, 30-day rolling window 2026-04-14 09:06:35 -07:00
AgentSeal
40d04261d6 cleanup: strip TUI picker, promote currency command, remove verbose comments
- Remove CurrencyPicker component and all related state from dashboard
- Promote 'codeburn config currency' to top-level 'codeburn currency'
- Strip JSDoc comments that explain WHAT not WHY
- Remove forceRender hack and unused imports
2026-04-14 08:47:45 -07:00
AgentSeal
9ab7f37f6f Fix CSV formula injection in exports 2026-04-14 11:04:10 -04:00
BlairWelsh
f08f97cd3d feat: add interactive currency picker to dashboard
Press c in the dashboard to open a searchable currency picker modal.
Type to filter, arrow keys to navigate, enter to select, escape to
cancel. Shows 24 common currencies with the active one marked, and
accepts any valid ISO 4217 code typed directly.

Session-only switch -- does not write to config, so users can quickly
compare costs in different currencies without changing their default.
2026-04-14 14:09:39 +01:00
BlairWelsh
df69c2aadf feat: add currency picker to menubar plugin
Adds a Currency submenu to the SwiftBar/xbar dropdown with 16 common
currencies. Clicking one runs codeburn config currency and refreshes
the plugin. Active currency is marked with *.

The full 162 ISO 4217 currencies are available via the CLI for any
not listed in the menubar.
2026-04-14 13:51:11 +01:00
BlairWelsh
85304dbe30 feat: add multi-currency support
Display costs in any of 162 ISO 4217 currencies. Exchange rates are
fetched from frankfurter.app (ECB-backed, free, no API key) and cached
for 24h alongside the existing LiteLLM pricing cache.

Currency symbols and decimal rules come from Node's built-in Intl API
rather than hardcoded tables.

New command: codeburn config currency <code>
Reset: codeburn config currency --reset

Config stored at ~/.config/codeburn/config.json.
All internal calculations remain in USD -- conversion is display-only.
2026-04-14 13:51:11 +01:00
AgentSeal
efab93e78e cleanup: use Period type instead of inline union in renderDashboard 2026-04-14 04:58:47 -07:00
Øystein Krog
f66afc893d feat: add 30-day rolling window period
Add a '30days' period that shows the last 30 days of usage data, distinct
from 'month' which shows the current calendar month.

- New period available via `--period 30days` and keyboard shortcut `3`
- Dashboard cycles: Today > 7 Days > 30 Days > This Month
- Fix export command to use actual 30-day range instead of calendar month
  for the '30 Days' export label
2026-04-14 13:51:06 +02:00
AgentSeal
25bd54404c bump to 0.4.0: multi-provider support (Codex, provider plugin system) 2026-04-14 04:35:51 -07:00
AgentSeal
391a235d1d feat: multi-provider support (Codex + provider plugin system)
Add Codex (OpenAI) as a second provider alongside Claude Code. Provider
plugin architecture makes adding future providers (Pi, OpenCode, Amp) a
single-file addition.

- Provider interface: types, session discovery, stateful JSONL parsing
- Codex parser: token_count dedup, tool normalization, model resolution
- TUI: press p to cycle All/Claude/Codex with 1-min cache for instant switching
- CLI: --provider flag on report, today, month, status, export commands
- Pricing: Codex model fallbacks, fixed fuzzy matching for gpt-5.4-mini
- Menubar: per-provider cost breakdown when multiple providers detected
- 27 tests (10 new: Codex parser, provider registry, tool/model mapping)
2026-04-14 04:32:09 -07:00
AgentSeal
ef0f49d14a bump to 0.3.1: full-width Activity panel, Shell Commands, ENOENT fix 2026-04-14 01:41:53 -07:00
AgentSeal
cb5853c460
Merge pull request #6 from rafaelcalleja/feat/bash-breakdown-panel
feat: add Shell Commands breakdown panel
2026-04-14 10:39:23 +02:00
AgentSeal
3964478e61 fix: handle unreadable session files gracefully
readFile in parseSessionFile had no error handling. If a .jsonl file
is missing, has bad permissions, or gets deleted between readdir and
readFile, the whole process crashes with ENOENT. Now returns null
and skips the file.

Fixes #9
2026-04-14 01:31:31 -07:00
AgentSeal
c7c6a0d2ec bump to 0.3.0 for npm publish 2026-04-14 01:26:02 -07:00
Rafael Calleja
a5696362f2 refactor: share BASH_TOOLS from classifier, remove comments
- Export BASH_TOOLS from classifier.ts instead of duplicating in bash-utils.ts
- Remove isBashTool helper (use BASH_TOOLS.has() directly)
- Strip unnecessary comments per codebase conventions
2026-04-14 10:24:38 +02:00
Rafael Calleja
4f2fcf81d8 feat: add shell commands section to CSV and JSON export 2026-04-14 10:24:38 +02:00
Rafael Calleja
260cad9e08 feat: add Shell Commands breakdown panel to dashboard 2026-04-14 10:24:38 +02:00
Rafael Calleja
6d8c8643a0 feat: extract bash commands and add bashBreakdown to session summary 2026-04-14 10:24:38 +02:00
Rafael Calleja
45ce697eea fix: correct quote-handling alignment in extractBashCommands
Replace quoted strings with same-length spaces in stripQuotedStrings so
separator indices in the stripped string map correctly to the original.
Add test coverage for quoted separators and isBashTool.
2026-04-14 10:24:24 +02:00
Rafael Calleja
b75c2663b4 feat: add extractBashCommands with TDD tests
Implements bash command parsing utility that splits on &&, ;, and |
separators while respecting quoted strings. Includes isBashTool helper.
All 12 vitest tests pass.
2026-04-14 10:24:24 +02:00
AgentSeal
d20281514c feat: one-shot success rate per activity category
Detects edit/test/fix retry cycles (Edit -> Bash -> Edit) within each
turn. Shows 1-shot percentage in the By Activity panel for categories
that involve code edits. Updated screenshot and README.

Fixes #4
2026-04-14 01:14:34 -07:00
AgentSeal
74744f07bb fix: stop tool-result entries from splitting turns and inflating Conversation
Tool results in JSONL are type:"user" entries with no text content.
groupIntoTurns was flushing on every type:"user" entry, creating
phantom turns that got classified as Conversation. Now only flush
when the user entry contains actual text.

Fixes #7
2026-04-14 00:57:43 -07:00
AgentSeal
0da57d1172 add Claude Desktop (code tab) session support
Scans ~/Library/Application Support/Claude/local-agent-mode-sessions/
for Desktop sessions in addition to ~/.claude/projects/. Same JSONL
format, just nested deeper. Cross-platform paths for macOS/Windows/Linux.
2026-04-13 17:58:19 -07:00
AgentSeal
f6cc68a7d4 support CLAUDE_CONFIG_DIR environment variable
Respects CLAUDE_CONFIG_DIR if set, falls back to ~/.claude.
Closes #3.
2026-04-13 17:52:27 -07:00
AgentSeal
00afed6930 v0.1.0 - initial release
Interactive TUI dashboard for Claude Code token observability.
13-category task classifier, per-project/model/tool breakdowns,
gradient bar charts, SwiftBar menu bar widget, CSV/JSON export.
2026-04-13 15:10:27 -07:00