Skip to content

feat(tui): optionally share plan and build model#37727

Open
zpin wants to merge 3 commits into
anomalyco:devfrom
zpin:shared-model-selection
Open

feat(tui): optionally share plan and build model#37727
zpin wants to merge 3 commits into
anomalyco:devfrom
zpin:shared-model-selection

Conversation

@zpin

@zpin zpin commented Jul 19, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #36640

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds an optional share_plan_build_model TUI setting.

When enabled, selecting a model while using the Plan or Build agent applies that selection to both agents. This includes direct model selection and cycling through recent or favorite models.

The setting defaults to false, preserving existing per-agent behavior. Custom agents continue to maintain independent model selections.

How did you verify your code works?

Ran the TUI tests and typecheck:

bun run --cwd packages/tui test test/context/local.test.ts test/config.test.tsx
bun run --cwd packages/tui typecheck

Added coverage for:

  • Existing per-agent behavior when disabled
  • Shared Plan/Build selection when enabled
  • Independent custom-agent selection

Screenshots / recordings

Not applicable. This changes model-selection behavior without adding or changing UI elements.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Hey! Your PR title Shared model selection doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@zpin zpin changed the title Shared model selection feat(tui): optionally share plan and build model Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Keep the model when switching the agent

1 participant