diff options
| author | Vlad Temian <[email protected]> | 2025-12-31 21:04:23 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-31 13:04:23 -0600 |
| commit | 87f9ebd17c3836edb400ca4f0917213a8d6e46e9 (patch) | |
| tree | 9e437102641b7c73f9b651bceb55f4c6a8683ba6 /packages | |
| parent | e7422ee782264993394f5551275eccc8cc52e1de (diff) | |
| download | opencode-87f9ebd17c3836edb400ca4f0917213a8d6e46e9.tar.gz opencode-87f9ebd17c3836edb400ca4f0917213a8d6e46e9.zip | |
fix(tui): don't show 'Agent not found' toast for subagents (#6528)
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx | 6 |
1 files changed, 5 insertions, 1 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 2a0ac8461..ab9487e1d 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -202,7 +202,11 @@ export function Prompt(props: PromptProps) { 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.variant) local.model.variant.set(msg.variant) } |
