fix: strip parenthetical suffix from model display name#283
Merged
sirmalloc merged 2 commits intosirmalloc:mainfrom Apr 8, 2026
Merged
fix: strip parenthetical suffix from model display name#283sirmalloc merged 2 commits intosirmalloc:mainfrom
sirmalloc merged 2 commits intosirmalloc:mainfrom
Conversation
Removes trailing parenthetical (e.g., "(1M context)", "(200K context)") from model display names. "Opus 4.6 (1M context)" becomes "Opus 4.6". Users who want the context window size displayed can add the existing context-length widget to their layout. Fixes sirmalloc#238 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
|
Thanks for this, it will be published in the next release. |
pcvelz
added a commit
to pcvelz/ccstatusline-usage
that referenced
this pull request
Apr 10, 2026
- fix: Fix token overcounting from streaming duplicate JSONL entries (sirmalloc#278) - fix: strip parenthetical suffix from model display name (sirmalloc#283) - Version bump, README cleanup Fork adaptation: Model.ts preserves [1m] suffix while adopting upstream's general parenthetical-strip regex. Model.test.ts updated to match fork behavior (ResetTimerWidget depends on [1m] for charged-model detection).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"Opus 4.6 (1M context)"→"Opus 4.6""Sonnet 4.6 (200K context)"→"Sonnet 4.6""Sonnet 4.6"(no parenthetical) → unchanged"Haiku 4.5"→ unchanged(...)suffix is strippedUsers who want the context window size displayed can add the existing
context-lengthwidget to their layout — it already shows1M,200K, etc.Fixes #238
Changes
src/widgets/Model.ts.replace(/\s*\(.*\)$/, '')to strip parenthetical before renderingsrc/widgets/__tests__/Model.test.tsTest Plan
bun test— 9 new Model tests pass, no regressionsbun run lint— zero errors, zero warningsbun run build— succeeds🤖 Generated with Claude Code