Conversation
New command "Claude Status: Export Usage Data..." exports the daily usage history — the same aggregation that powers the heatmap, covering claudeStatus.heatmap.days days — for expense reports and external analysis. - QuickPick format selection (CSV or JSON) + save dialog - CSV: date,cost_usd,messages,tokens with one row per day - JSON: exportedAt, days, totalCostUsd, and per-day records - Serializers in src/data/exportUsage.ts (pure, unit-tested) - l10n: EN/JA/ZH command title and runtime strings - Docs: SETTINGS.md commands section, README usage tables (EN/JA/ZH), CHANGELOG Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ZLCLQeudf1LQBnBSyyr4f
The ubuntu job failed on the pre-existing heatmap test flake that only reproduces between 02:00 and 03:00 local time; the fix ships in #37. Empty commit to re-run CI outside that window. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ZLCLQeudf1LQBnBSyyr4f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New command
Claude Status: Export Usage Data...exports the daily usage history — the same aggregation that powers the heatmap, coveringclaudeStatus.heatmap.daysdays — so users can feed it into expense reports or external analysis. Independent of #37/#38/#39; based directly onmain.UX
~/claude-usage-YYYY-MM-DD.csv|json) → confirmation toast with the written pathIf there is no recorded activity yet, a warning toast is shown instead of writing an empty file.
Formats
date,cost_usd,messages,tokens, one row per day including zero-activity days, cost at 4 decimal places.{ exportedAt, days, totalCostUsd, daily: [{ date, costUsd, messages, tokens }] }.Implementation
src/data/exportUsage.tsas pure functions (novscodeimport) so they run under plain mocha.extension.ts; writes viavscode.workspace.fs.writeFileso remote workspaces work.dataManager.getHeatmapData()(5-minute in-memory cache) — no extra JSONL scan.package.nls*(EN/JA/ZH) and runtime strings inl10n/bundle.l10n.*.docs/SETTINGS.mdcommands section + format spec, README usage tables (EN/JA/ZH), CHANGELOG.Tests
New
exportUsagesuite: CSV header/rows/decimal formatting/empty input, JSON round-trip shape,totalCostUsdsum.npm run lint✅,npm run compile✅, unit suites ✅ via mocha — the one failure locally is the pre-existing time-of-day flake in the heatmap suite that #37 fixes (unrelated to this change).@vscode/test-electroncannot download VS Code in this sandbox; please rely on CI for the extension-host suites.🤖 Generated with Claude Code
https://claude.ai/code/session_012ZLCLQeudf1LQBnBSyyr4f
Generated by Claude Code