core: add verification that at least 1 primary agent is enabled, add regression tests (#5881)
This commit is contained in:
parent
cfaac9f2e1
commit
d3922f0965
1 changed files with 186 additions and 0 deletions
|
|
@ -262,6 +262,14 @@ export namespace Agent {
|
|||
}
|
||||
}
|
||||
|
||||
const hasPrimaryAgents = Object.values(result).filter((a) => a.mode !== "subagent" && !a.hidden).length > 0
|
||||
if (!hasPrimaryAgents) {
|
||||
throw new Config.InvalidError({
|
||||
path: "config",
|
||||
message: "No primary agents are available. Please configure at least one agent with mode 'primary' or 'all'.",
|
||||
})
|
||||
}
|
||||
|
||||
return result
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue