Skip to content

Commit 6e6ead2

Browse files
committed
cost dialog: enrich with session stats, per-model percentages, and formatting fixes
Enhance the /cost dialog with richer session insights: - Show total token count (input + output combined) in the Total section - Display session duration and message count in the header - Show reasoning tokens when the model reports them (e.g. o1) - Add average cost per 1K tokens and average cost per message metrics - Show cost percentage breakdown per model and per message - Display cache hit rate and per-entry cached token counts - Include model name in the plain-text clipboard copy output Code quality improvements: - Extract shared stat computation (totalStats, actualMessageCount, plainTextLine) to eliminate duplication between styled and plain-text renderers - Fix slice aliasing bug in applyScrolling (use slices.Clone) - Fix formatCost/formatCostPadded silently swallowing negative values - Fix formatDuration producing garbled output for negative durations Assisted-By: docker-agent
1 parent 8ad9626 commit 6e6ead2

2 files changed

Lines changed: 410 additions & 62 deletions

File tree

0 commit comments

Comments
 (0)