Commit graph

3 commits

Author SHA1 Message Date
Aditya Vikram Singh
5ba787346b fix(compare): honor --model-a/--model-b in the TUI and resolve display names
The TUI comparison picker silently ignored --model-a/--model-b (only the
--format json path used them), and both paths required the canonical model
id verbatim with no way to pass the display name the picker itself shows
(e.g. "Opus 4.8" for claude-opus-4-8).

Adds findModelStat, a shared lookup that matches the canonical id first and
falls back to getShortModelName's existing canonical -> display mapping
(case-insensitive) rather than a new alias table. Both the JSON path and
renderCompare/CompareView now use it; renderCompare resolves --model-a/
--model-b up front and seeds CompareView's picked-models state so results
load immediately instead of showing the picker. Also validates "both or
neither" for the TUI (default) format, matching the JSON path.

Fixes getagentseal/codeburn#767 (item 1).
2026-07-29 22:58:05 +05:30
Resham Joshi
15a381b7d2
test: cli-emitters expects the title field sessions rows now carry (#789)
The #782 titles threading added title to the sessions JSON row shape but
missed this emitter test's key list; caught by the first full-suite run
since the merge.

Co-authored-by: reviewer <review@local>
2026-07-20 14:18:20 -07:00
iamtoruk
fc1920d4f1 feat(cli): add compare and sessions JSON emitters
compare --format json: list mode (aggregateModelStats for pickers) +
full mode via --model-a/--model-b, emitting
{period, modelA, modelB, metrics, categories, workingStyle}.
Reuses computeComparison/computeCategoryComparison/computeWorkingStyle/
scanSelfCorrections; TUI path unchanged.

sessions --format json: new src/sessions-report.ts, uncapped flat
SessionRow[] (id, project, provider, models, cost, tokens, turns,
duration) via aggregateSessions; table + json formats.

Enables the desktop app's Sessions + Compare screens (Phase 3b).
2026-07-11 12:16:45 -07:00