Fix build
This commit is contained in:
committed by
pullfrog[bot]
parent
fa01f9c06d
commit
7369e952e4
@@ -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;
|
||||
}
|
||||
|
||||
+8
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user