Skip to content

Commit 08b94a6

Browse files
authored
fix: keep primary model after subagent runs (anomalyco#8951)
1 parent 8cddc9e commit 08b94a6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/opencode/src/cli/cmd/tui/component/prompt

packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ export function Prompt(props: PromptProps) {
145145
const isPrimaryAgent = local.agent.list().some((x) => x.name === msg.agent)
146146
if (msg.agent && isPrimaryAgent) {
147147
local.agent.set(msg.agent)
148+
if (msg.model) local.model.set(msg.model)
149+
if (msg.variant) local.model.variant.set(msg.variant)
148150
}
149-
if (msg.model) local.model.set(msg.model)
150-
if (msg.variant) local.model.variant.set(msg.variant)
151151
}
152152
})
153153

0 commit comments

Comments
 (0)