fix(agents): stop param shadowing in auth failure marker

This commit is contained in:
Ayaan Zaidi
2026-02-22 21:00:17 +05:30
parent ace8357149
commit 6268ed57ea

View File

@@ -500,11 +500,11 @@ export async function runEmbeddedPiAgent(
let lastRunPromptUsage: ReturnType<typeof normalizeUsage> | undefined; let lastRunPromptUsage: ReturnType<typeof normalizeUsage> | undefined;
let autoCompactionCount = 0; let autoCompactionCount = 0;
let runLoopIterations = 0; let runLoopIterations = 0;
const maybeMarkAuthProfileFailure = async (params: { const maybeMarkAuthProfileFailure = async (failure: {
profileId?: string; profileId?: string;
reason?: Parameters<typeof markAuthProfileFailure>[0]["reason"] | null; reason?: Parameters<typeof markAuthProfileFailure>[0]["reason"] | null;
}) => { }) => {
const { profileId, reason } = params; const { profileId, reason } = failure;
if (!profileId || !reason || reason === "timeout") { if (!profileId || !reason || reason === "timeout") {
return; return;
} }
@@ -513,7 +513,7 @@ export async function runEmbeddedPiAgent(
profileId, profileId,
reason, reason,
cfg: params.config, cfg: params.config,
agentDir: params.agentDir, agentDir,
}); });
}; };
try { try {