Skip to content

v1.2 — Token count in context segment

Latest

Choose a tag to compare

@aishwaryasingh51 aishwaryasingh51 released this 01 Jun 15:57
· 2 commits to main since this release

What's new

The context window segment now shows raw token usage alongside the percentage:

Statusline v1.2

  • Context segment now reads 󰍛 12% (24.2k/200k) — percent first, tokens in parentheses
  • Used-token count shares the same gradient color as the percentage; denominator stays muted
  • Git status flags (!, ?) are now both gold — consistent dirty-tree color
  • Single-space separation between git, plan badge, and model name — cleaner left side
  • Separators collapse automatically when a segment is absent (e.g. no plan badge)
  • Falls back to percent-only before the first API response or after /compact

Changes

  • Parse context_window.total_input_tokens and context_window_size in the single jq call
  • Add fmtk() helper: zero-subshell compact kilo formatting (16600 → 16.6k)
  • _sep variable handles collapsing separators between git/plan/model segments
  • Untracked flag ? switched from C_MUTED to C_GOLD to match modified flag !
  • Updated README preview screenshot and segment table
  • Added Changelog section to README