fix(vscode): keep custom provider picker open after partial add - #10195
Conversation
The picker called setFetchedModels(undefined) unconditionally after "Add Selected", wiping the remaining un-picked models. Users had to re-fetch to add a subset twice in a row. Filter the picked IDs out of fetchedModels and clear the selection. Only close the picker when every fetched model has been added. Refs: Kilo-Org#10139
Opened Kilo-Org/kilocode#10195 fixing the picker-disappears half of #10139. Triage comment on #10139 with four narrowing questions for the API-key persistence half.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThe change in
One minor observation (not worth blocking): Files Reviewed (1 file)
Fix these issues in Kilo Cloud Reviewed by claude-sonnet-4.6 · 261,472 tokens |
|
Polite nudge in case this slipped past triage, @marius-kilocode. The fix is one line in |
|
@chrarnoldus since you just merged #11121 (the fetch-auth half of #10139), flagging that this is its one-line companion from the same issue: the picker-disappearing half. |
…r-picker-persists-after-add-10139 fix(vscode): keep custom provider picker open after partial add
Context
Refs #10139 (first of two reports in that issue).
The "Fetched models" picker in the Custom Provider dialog wipes itself after the user clicks Add Selected, even when only a subset of the fetched models was added. The user has to re-enter the base URL/key to trigger another fetch in order to add the rest. The expected behavior is for the un-picked models to stay visible.
Implementation
addSelected()inCustomProviderDialog.tsxunconditionally calledsetFetchedModels(undefined)after merging the picked rows intoform.models. That cleared the picker entirely.The fix filters the picked IDs out of
fetchedModelsand clears the selection. Only when every fetched model has been added do we close the picker (the previous behavior). Search input is preserved across partial adds so the user can keep narrowing.The auto-fetch effect at line 167 is unaffected: it watches
fetchURL/fetchKeysignals, not the picker state, so partial-add no longer races against a refetch.The second report in #10139 (API key not persisting after Submit) is intentionally out of scope here; I left a comment on the issue with what I traced and what reproduction info would help nail it down.
Screenshots
N/A — picker visibility change; no visual layout shift.
How to Test