Skip to content

Commit b3931fd

Browse files
committed
fix(ccusage): honor config jq for session output
Refs: ccusage#832
1 parent c7e5c45 commit b3931fd

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎.agents/plans/20260205T111801--pr-833-followup-review-fixes__progress_tracker.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55

66
## Task Status
77

8-
| # | Task | Status | Notes |
9-
| --- | --------------------------------------------------------- | ---------- | ----- |
8+
| # | Task | Status | Notes |
9+
| --- | --------------------------------------------------------- | ---------- | ----------------------------------------------------- |
1010
| 1 | Align opencode cache token field names in command outputs | ✅ Done | Updated daily/monthly/weekly/session JSON and tables. |
11-
| 2 | Use mergedOptions.jq for session JSON rendering | ⏸️ Pending | |
12-
| 3 | Update Codex test fixtures to valid model names | ⏸️ Pending | |
13-
| 4 | Compute pi daily totalTokens after loop | ⏸️ Pending | |
14-
| 5 | Extract/reuse pi empty totals helper (optional) | ⏸️ Pending | |
15-
| 6 | Switch codex session table totals to totalCost | ⏸️ Pending | |
16-
| 7 | Switch codex daily table totals to totalCost | ⏸️ Pending | |
17-
| 8 | Remove redundant cachedInputTokens in codex types | ⏸️ Pending | |
18-
| 9 | Improve docstring coverage to >=80% | ⏸️ Pending | |
19-
| 10 | Run format/typecheck/test | ⏸️ Pending | |
20-
| 11 | Run make targets (expect missing rules) | ⏸️ Pending | |
11+
| 2 | Use mergedOptions.jq for session JSON rendering | ✅ Done | Render paths now use mergedOptions.jq. |
12+
| 3 | Update Codex test fixtures to valid model names | ⏸️ Pending | |
13+
| 4 | Compute pi daily totalTokens after loop | ⏸️ Pending | |
14+
| 5 | Extract/reuse pi empty totals helper (optional) | ⏸️ Pending | |
15+
| 6 | Switch codex session table totals to totalCost | ⏸️ Pending | |
16+
| 7 | Switch codex daily table totals to totalCost | ⏸️ Pending | |
17+
| 8 | Remove redundant cachedInputTokens in codex types | ⏸️ Pending | |
18+
| 9 | Improve docstring coverage to >=80% | ⏸️ Pending | |
19+
| 10 | Run format/typecheck/test | ⏸️ Pending | |
20+
| 11 | Run make targets (expect missing rules) | ⏸️ Pending | |
2121

2222
## Completed Work
2323

‎apps/ccusage/src/commands/session.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const sessionCommand = define({
143143
cacheReadTokens: 0,
144144
totalCost: 0,
145145
};
146-
const jsonResult = await renderSessionJsonOutput([], totals, ctx.values.jq);
146+
const jsonResult = await renderSessionJsonOutput([], totals, mergedOptions.jq);
147147
if (Result.isFailure(jsonResult)) {
148148
logger.error(jsonResult.error.message);
149149
process.exit(1);
@@ -165,7 +165,7 @@ export const sessionCommand = define({
165165
}
166166

167167
if (useJson) {
168-
const jsonResult = await renderSessionJsonOutput(sessionData, totals, ctx.values.jq);
168+
const jsonResult = await renderSessionJsonOutput(sessionData, totals, mergedOptions.jq);
169169
if (Result.isFailure(jsonResult)) {
170170
logger.error(jsonResult.error.message);
171171
process.exit(1);

0 commit comments

Comments
 (0)