From 7369e952e49f793296971b85c4b3073098b0465d Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Mon, 19 Jan 2026 17:51:13 +0000 Subject: [PATCH] Fix build --- entry | 8 ++++++-- utils/agent.ts | 11 ++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/entry b/entry index 68ba60d..780d86b 100755 --- a/entry +++ b/entry @@ -137974,8 +137974,12 @@ function resolveAgent(params) { if (!agent3) { throw new Error(`invalid agent name: ${configuredAgentName}`); } - const isExplicitOverride = agentOverride !== void 0 || params.payload.agent !== void 0; - if (isExplicitOverride || agentHasApiKeys(agent3)) { + const isExplicitOverride = agentOverride !== void 0 || params.payload.agent !== null; + if (isExplicitOverride) { + log.info(`\xBB selected configured agent: ${agent3.name}`); + return agent3; + } + if (agentHasApiKeys(agent3)) { log.info(`\xBB selected configured agent: ${agent3.name}`); return agent3; } diff --git a/utils/agent.ts b/utils/agent.ts index 09c19ee..b0dc012 100644 --- a/utils/agent.ts +++ b/utils/agent.ts @@ -38,9 +38,14 @@ export function resolveAgent(params: { // if explicitly configured (via override or payload), respect it even without matching keys // this allows users to force an agent selection (will fail later with clear error if no keys) - // for repo-level defaults, only select if agent has matching API keys - const isExplicitOverride = agentOverride !== undefined || params.payload.agent !== undefined; - if (isExplicitOverride || agentHasApiKeys(agent)) { + const isExplicitOverride = agentOverride !== undefined || params.payload.agent !== null; + if (isExplicitOverride) { + log.info(`» selected configured agent: ${agent.name}`); + return agent; + } + + // for repo-level defaults, check if agent has matching keys before selecting + if (agentHasApiKeys(agent)) { log.info(`» selected configured agent: ${agent.name}`); return agent; }