mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 07:52:03 +00:00
fix(tui): don't show 'Agent not found' toast for subagents (#6528)
This commit is contained in:
parent
e7422ee782
commit
87f9ebd17c
1 changed files with 5 additions and 1 deletions
|
|
@ -202,7 +202,11 @@ export function Prompt(props: PromptProps) {
|
||||||
|
|
||||||
syncedSessionID = sessionID
|
syncedSessionID = sessionID
|
||||||
|
|
||||||
if (msg.agent) local.agent.set(msg.agent)
|
// Only set agent if it's a primary agent (not a subagent)
|
||||||
|
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.model) local.model.set(msg.model)
|
||||||
if (msg.variant) local.model.variant.set(msg.variant)
|
if (msg.variant) local.model.variant.set(msg.variant)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue