feat(vscode): add search to model selector popover#107
Open
zeug-zz wants to merge 1 commit into
Open
Conversation
Adds a case-insensitive search input to the ModelSelector popover so users with many providers/models can quickly filter by text. Search matches against provider name/id and model name/id; a matching provider shows all of its models. The search input is anchored at the bottom of the upward-opening popover so it stays adjacent to the model button regardless of viewport. While searching, the connected-only filter applies, the footer is hidden, and collapse state is ignored so matching providers are always expanded. An empty state is shown when no matches exist. - New keys model.searchPlaceholder and model.noSearchResults across all 8 locales. - Search input font reduced to 11px to match the existing LinkButton in the footer; placeholder uses --vscode-input-placeholderForeground with a light-grey fallback. - Test 06-model-selection adds three scenarios; the filter assertion is scoped to the panel via within(...) since the trigger button always shows the selected model name.
3f7b0d8 to
dbb1d6d
Compare
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.
Adds a case-insensitive search input to the ModelSelector popover so users with many providers/models can quickly filter by text. Search matches against provider name/id and model name/id; a matching provider shows all of its models.
The search input is anchored at the bottom of the upward-opening popover so it stays adjacent to the model button regardless of viewport. While searching, the connected-only filter applies, the footer is hidden, and collapse state is ignored so matching providers are always expanded. An empty state is shown when no matches exist.
Changes
model.searchPlaceholderandmodel.noSearchResultsacross all 8 locales.Show all providersLinkButton:1px 6px) so the input box height matches the LinkButton's ~19px..searchBoxwrapper uses symmetric 8px padding so the input is vertically centered.--vscode-input-placeholderForegroundwith a light-grey fallback.Tests
06-model-selection.test.tsxadds three scenarios:The filter assertion is scoped to the panel via
within(...)since the trigger button always shows the selected model name.