Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
The change looks sound: it reuses the Manage models header switch (same control, same providerVisible / setProviderVisibility logic) through the existing action slot of ProviderModelSections, so the two screens now match. I checked it by reading the code against manage.tsx and provider-group.tsx and running bun run typecheck in packages/app, which passes. I couldn't click through it in a browser here; your before/after screenshots cover the visible result.
Public API: unchanged (app UI only).
One small correction to the description: providerVisible isn't an existing helper in this file. This PR adds it, copied from manage.tsx, which is fine.
Not blocking: #51479 changes setProviderVisibility in this same file to save one setting per provider instead of one per model. Whichever of the two merges second needs a small rebase. Until then, this switch is as slow on very large providers (e.g. OpenRouter) as the one in Manage models.
Related: #51479
Issue for this PR
Closes #45225
Type of change
What does this PR do?
Settings → Models only offered a per-model visibility switch, so showing or hiding every model of a provider meant clicking each one. Each provider header now carries a master visibility toggle through the existing
ProviderModelSections.actionslot, using the existingsetProviderVisibilityhelper and aproviderVisiblehelper copied from the Manage models dialog. No new state or storage.The switch reuses the exact control and placement (
me-6) of the model picker's "Manage models" dialog, so the header control sits in the same position relative to the model rows as it already does there rather than introducing a new alignment.How did you verify your code works?
bun typecheckinpackages/appis clean. In the running app, toggling theOpenCode Freeheader flipped all 12 of its model switches, and the state persisted across a reload.Screenshots / recordings
Before / after:
Placement matches the existing Manage models dialog:
Checklist