make variant modal less annoying#19998
Merged
Hona merged 3 commits intoanomalyco:devfrom Mar 30, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the TUI’s model-variant UX so variant selection is remembered per model and the variant picker modal is shown only when needed, with keyboard cycling support thereafter.
Changes:
- Persist a per-model variant “selection” (including an explicit “default” choice) and add validation for the active/usable variant.
- Add an explicit “Default” option to the variant selection dialog and adjust model selection flow to avoid re-prompting once a choice is recorded.
- Introduce a dedicated “Variant cycle” command/action and add
/variantsto manually open the variant modal.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/opencode/src/cli/cmd/tui/context/local.tsx | Adds selected() vs validated current() variant accessors; persists "default" sentinel for explicit default selection; updates cycling logic accordingly. |
| packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx | Switches prompt submission to use the stored variant selection value. |
| packages/opencode/src/cli/cmd/tui/component/dialog-variant.tsx | Adds an explicit “Default” entry and uses selected() to highlight the stored choice. |
| packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx | Avoids showing the variant modal if a prior selection exists for that model; otherwise prompts once when variants are available. |
| packages/opencode/src/cli/cmd/tui/app.tsx | Adds a new “Variant cycle” action and introduces /variants for manual modal access. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
afanty2021
pushed a commit
to afanty2021/opencode
that referenced
this pull request
Mar 30, 2026
balcsida
pushed a commit
to balcsida/opencode
that referenced
this pull request
Apr 8, 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.
Summary
ctrl+tcycles variants and/variantsopens the modal manually