fix(tui): keep Kilo Gateway models visible in the model picker - #13170
Merged
Conversation
Selecting a model removed it from its provider section, so a recently used Kilo sonnet vanished from "Recommended"/"Kilo Gateway" and only survived under "Recent". Search also keyed off title and section header only, so filtering by `kilo` never matched titles like "Anthropic Claude Sonnet 4.5" grouped under "Recommended". Recents now stay in their provider section (favorites are still deduped into their own section) and search additionally keys off the provider name, provider id, and model id, matching the VS Code selector. Option building moves to kilocode/model-picker.ts so the grouping and search rules are unit testable.
johnnyeric
force-pushed
the
johnnyeric/tui-gateway-model-picker
branch
from
August 18, 2026 09:20
ffaedd9 to
942d9ce
Compare
Keeping recents in their provider section means a model can legitimately appear twice in the list (once under "Recent", once under its provider or "Recommended" section). DialogSelect resolved the selected row by value equality, so both copies lit up as active whenever either was selected — visible on every picker open, since the current model is usually a recent — and hovering the provider-section copy warped selection and scroll to the "Recent" copy instead. Match the selected row by object reference instead. Rows are always distinct objects, so this is a strict refinement for every other dialog; `current` still uses value equality, which is correct — both rows really are the current model.
johnnyeric
marked this pull request as ready for review
August 18, 2026 10:19
Contributor
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
The extraction into Fix these issues in Kilo Cloud Files Reviewed (5 files)
Reviewed by kimi-k3 · Input: 110.2K · Output: 10.9K · Cached: 477.7K Review guidance: REVIEW.md from base branch |
marius-kilocode
approved these changes
Aug 18, 2026
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.
Issue
No public issue. Internal report: after using Bedrock in the TUI, Kilo Gateway sonnets disappeared from the Kilo Gateway section and from a
kilofilter.Context
The TUI picker moved recommended Kilo models into a Recommended section and then stripped recents out of their provider group. Search only matched title + section header, so typing
kilomissed those rows.Implementation
Extracted the option builder into a kilo-owned module. Recents stay in their provider / Recommended section. Search also matches provider name and ids.
Favorites are still deduped out of the provider section (they already have their own). Recently used models now appear twice (Recent + provider).
dialog-select.tsxnow matches the selected row by object reference, not value. Once recents can also sit in their provider section, value equality highlighted both copies and hover jumped to Recent.Screenshots / Video
Before (recents strip)
After (recents stay in their section)
Human A/B on query
kilo: on main, Recent and Recommended vanish and only the Kilo Gateway long tail remains (titles have no "kilo", category is Recommended/Recent). On this branch both sections stay filled. Filtered order is fuzzysort, not recommendedIndex.How to Test
Manual/local verification
bunx tsgo --noEmitinpackages/tui— cleanbun testinpackages/tui— pass/models— Sol is under Recent and OpenAIkilo— Recent / Recommended Kilo rows still match; Claude Opus 5 can appear twice with only one highlightReviewer test steps
cd packages/tui && bun test test/kilocode/model-picker.test.tskilo. Recommended / recent Kilo models should still match.Blocked checks and substitute verification
Checklist
Get in Touch