Merge remote-tracking branch 'origin/dev' into feat/custom-agents
# Conflicts: # src/agents/utils.test.ts # src/plugin-handlers/agent-config-handler.ts
This commit is contained in:
@@ -135,7 +135,14 @@ export async function applyAgentConfig(params: {
|
||||
useTaskSystem,
|
||||
disableOmoEnv,
|
||||
);
|
||||
const disabledAgentNames = new Set(
|
||||
(migratedDisabledAgents ?? []).map(a => a.toLowerCase())
|
||||
);
|
||||
|
||||
const filterDisabledAgents = (agents: Record<string, unknown>) =>
|
||||
Object.fromEntries(
|
||||
Object.entries(agents).filter(([name]) => !disabledAgentNames.has(name.toLowerCase()))
|
||||
);
|
||||
const isSisyphusEnabled = params.pluginConfig.sisyphus_agent?.disabled !== true;
|
||||
const builderEnabled =
|
||||
params.pluginConfig.sisyphus_agent?.default_builder_enabled ?? false;
|
||||
@@ -223,9 +230,9 @@ export async function applyAgentConfig(params: {
|
||||
...Object.fromEntries(
|
||||
Object.entries(builtinAgents).filter(([key]) => key !== "sisyphus"),
|
||||
),
|
||||
...userAgents,
|
||||
...projectAgents,
|
||||
...pluginAgents,
|
||||
...filterDisabledAgents(userAgents),
|
||||
...filterDisabledAgents(projectAgents),
|
||||
...filterDisabledAgents(pluginAgents),
|
||||
...filteredConfigAgents,
|
||||
build: { ...migratedBuild, mode: "subagent", hidden: true },
|
||||
...(planDemoteConfig ? { plan: planDemoteConfig } : {}),
|
||||
@@ -233,9 +240,9 @@ export async function applyAgentConfig(params: {
|
||||
} else {
|
||||
params.config.agent = {
|
||||
...builtinAgents,
|
||||
...userAgents,
|
||||
...projectAgents,
|
||||
...pluginAgents,
|
||||
...filterDisabledAgents(userAgents),
|
||||
...filterDisabledAgents(projectAgents),
|
||||
...filterDisabledAgents(pluginAgents),
|
||||
...configAgent,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user