The open source coding agent.
TypeScript
fix: keep primary model after subagent runs (#8951)
Seth Carlton08b94a689027
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsxindex 96b9e8ffd57..145fa9da0c3 100644--- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx@@ -145,9 +145,9 @@ export function Prompt(props: PromptProps) {const isPrimaryAgent = local.agent.list().some((x) => x.name === msg.agent)if (msg.agent && isPrimaryAgent) {local.agent.set(msg.agent)+ if (msg.model) local.model.set(msg.model)+ if (msg.variant) local.model.variant.set(msg.variant)}- if (msg.model) local.model.set(msg.model)- if (msg.variant) local.model.variant.set(msg.variant)}})