Fix build

This commit is contained in:
Colin McDonnell
2026-01-19 17:51:13 +00:00
committed by pullfrog[bot]
parent fa01f9c06d
commit 7369e952e4
2 changed files with 14 additions and 5 deletions
+6 -2
View File
@@ -137974,8 +137974,12 @@ function resolveAgent(params) {
if (!agent3) { if (!agent3) {
throw new Error(`invalid agent name: ${configuredAgentName}`); throw new Error(`invalid agent name: ${configuredAgentName}`);
} }
const isExplicitOverride = agentOverride !== void 0 || params.payload.agent !== void 0; const isExplicitOverride = agentOverride !== void 0 || params.payload.agent !== null;
if (isExplicitOverride || agentHasApiKeys(agent3)) { if (isExplicitOverride) {
log.info(`\xBB selected configured agent: ${agent3.name}`);
return agent3;
}
if (agentHasApiKeys(agent3)) {
log.info(`\xBB selected configured agent: ${agent3.name}`); log.info(`\xBB selected configured agent: ${agent3.name}`);
return agent3; return agent3;
} }
+8 -3
View File
@@ -38,9 +38,14 @@ export function resolveAgent(params: {
// if explicitly configured (via override or payload), respect it even without matching keys // 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) // 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 !== null;
const isExplicitOverride = agentOverride !== undefined || params.payload.agent !== undefined; if (isExplicitOverride) {
if (isExplicitOverride || agentHasApiKeys(agent)) { 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}`); log.info(`» selected configured agent: ${agent.name}`);
return agent; return agent;
} }