fix(opencode): scope TUI variant state per agent#18013
Open
CptnKirk wants to merge 4 commits intoanomalyco:devfrom
Open
fix(opencode): scope TUI variant state per agent#18013CptnKirk wants to merge 4 commits intoanomalyco:devfrom
CptnKirk wants to merge 4 commits intoanomalyco:devfrom
Conversation
|
I am experiencing the same issue this PR will fix. I am switching between plan and build agents, but the problem is that I cannot persist a variant exclusive to each agent, it currently shares the variant when switching between agents. |
6 tasks
|
Guys, please review and merge the PR, it fixes real bug. |
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 #13718
Refs #16034
Type of change
What does this PR do?
Fixes a TUI bug where persisted variant selections were keyed by
provider/model, so agents that shared a model could inherit a stale variant selection from each other.This changes TUI variant persistence to use agent-scoped keys instead, and resolves the active variant as
selected > configured > none. Obsolete legacyprovider/modelentries are ignored on load and removed on the next save.How this relates to #16034
This proposed PR fixes the
#13718persistence-keying bug by storing TUI variant state per agent instead of perprovider/model.#16034describes the broader symptom.#16032approaches it by reapplying configured variants during agent/session switching; this proposed PR addresses the underlying cross-agent persistence collision instead.How did you verify your code works?
Added unit tests in
packages/opencode/test/cli/tui/model-variant.test.tscovering:Screenshots / recordings
N/A
Checklist