summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSeth Carlton <[email protected]>2026-01-16 16:19:17 -0600
committerGitHub <[email protected]>2026-01-16 16:19:17 -0600
commit08b94a6890276d1e654696c3be3274521d99b508 (patch)
tree2fa97fa29e02a6c9d40f812a9257f0f38f3ad5ee
parent8cddc9ea555039743c210392b63550781810f8ac (diff)
downloadopencode-08b94a6890276d1e654696c3be3274521d99b508.tar.gz
opencode-08b94a6890276d1e654696c3be3274521d99b508.zip
fix: keep primary model after subagent runs (#8951)
-rw-r--r--packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
index 96b9e8ffd..145fa9da0 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)
}
})