Repository navigation
Fixed model name detection for new CLI format with long label and spaced names - #101
Merged
Merged
Conversation
…ced names - DESC_PAT: relaxed min-space threshold from 3 to 2 to handle "Default (recommended)" label whose 2-space column alignment was skipping the model entry entirely - CURRENTLY_PAT / hintPat / currentlyPat: widened capture from [\w/.-]+ to [^)]+? so names like "Sonnet 4" (containing a space) are extracted correctly instead of returning the full description string - Applied both fixes to ModelMenuParser and the inline patterns in ClaudeSessionController.discoverModels() - Added two new fixture test cases: format1-long-label and format2-currently-with-space Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
DESC_PATrelaxed from\s{3,}to\s{2,}: the "Default (recommended)" label uses only 2-space column alignment, causing the model entry to be silently skippedCURRENTLY_PAT/hintPat/currentlyPatchanged from[\w/.-]+to[^)]+?: model names with a space (e.g. "Sonnet 4") were truncated to just the first word, falling back to the full description stringModelMenuParserand the three inline patterns inClaudeSessionController.discoverModels()Test plan
mvn test -Dtest=ModelMenuParserTest— all 11 fixtures pass/modelmenu — combo shows the correct short model name (e.g. "Haiku 4.5"), not the full description(currently Sonnet 4)-style default entry — combo shows "Sonnet 4"🤖 Generated with Claude Code