Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
The change looks sound to me. The new header switch matches the one in the Manage models dialog (packages/app/src/providers/models/manage.tsx): same visibility check, placement, label and action slot. It reuses the existing setProviderVisibility, and the OpenCode Console sub-groups keep their Enable all / Disable all menu, so the two controls don't overlap.
I couldn't run the app in a browser here. I ran typecheck:tsc and the packages/app unit tests, and both pass. Before/after screenshots of Settings → Models in the PR description would help maintainers see the new header switch.
The public API is unchanged.
Related: #58254
This branch has not been deployed
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 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 switch through the existing
ProviderModelSections.actionslot, reusing thesetProviderVisibilityhelper and aproviderVisiblehelper copied from the Manage models dialog. No new state or storage.The control and placement match the existing "Manage models" dialog, so the header switch sits in the same position relative to the model rows.
This replaces #54923: I deleted my fork failing to realise that would close my pull requests. -_-
How did you verify your code works?
bun run typecheck:tscis clean inpackages/app. In the running app, toggling theOpenCode Freeheader flipped all 12 of its model switches, and the state persisted across a reload.Screenshots / recordings
Checklist
Added by the opencode bot (AI-generated).
Related: #58254