Skip to content

feat: render new xhigh effort level with its own color#24

Merged
daniel3303 merged 1 commit into
daniel3303:mainfrom
FZ1010:feat/xhigh-effort-level
Apr 18, 2026
Merged

feat: render new xhigh effort level with its own color#24
daniel3303 merged 1 commit into
daniel3303:mainfrom
FZ1010:feat/xhigh-effort-level

Conversation

@FZ1010
Copy link
Copy Markdown
Contributor

@FZ1010 FZ1010 commented Apr 16, 2026

Closes #23.

Summary

Claude Code v2.1.111 added xhigh as an effort level between high and max (Opus 4.7 only). Both scripts fall through to the green default, so xhigh is indistinguishable from high.

This PR adds explicit high and xhigh cases to the effort switch in both statusline.sh and statusline.ps1. xhigh gets its own color so it's visually distinct from high (green) and max (red).

Color choice

I went with purple (#A78BFA, rgb(167, 139, 250)) for xhigh since green (high), red (max), orange (medium), and yellow (usage-50%) are already in the palette, and purple reads well on both dark and light terminals. Entirely a matter of taste — happy to change it to whatever you prefer (another shade, a different hue, a symbol prefix like !xhigh, etc.).

Verified

Both scripts tested locally with CLAUDE_CODE_EFFORT_LEVEL=xhigh against a mock Claude Code input. Output contains \033[38;2;167;139;250m (purple) for xhigh and the existing ANSI codes for the other levels.

level color (before) color (after)
low dim dim
medium orange (abbrev. med) orange (abbrev. med)
high green (via default) green (explicit)
xhigh green (via default) purple (explicit)
max red red

Test plan

  • CLAUDE_CODE_EFFORT_LEVEL=xhigh bash statusline.sh < mock.json — emits purple
  • CLAUDE_CODE_EFFORT_LEVEL=xhigh powershell -NoProfile -File statusline.ps1 < mock.json — emits purple
  • Other levels (low, medium, high, max) unchanged
  • Unknown values still hit the green default branch

Claude Code v2.1.111 introduced the xhigh effort level (between high
and max, Opus 4.7 only). Both scripts previously fell through to the
green default branch, so xhigh was indistinguishable from high.

Render xhigh in purple and add explicit high cases for clarity.
@FZ1010 FZ1010 changed the title feat: render new \xhigh\ effort level with its own color feat: render new xhigh effort level with its own color Apr 16, 2026
@daniel3303 daniel3303 merged commit 4c679c9 into daniel3303:main Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New xhigh effort level (Claude Code 2.1.111+) is rendered the same as high

2 participants