Keep interrupted manifest OAuth storage in recovery

This commit is contained in:
Dotta committed 2026-10-07 07:01:10 -05:00
1 parent 57b8838413
commit 58c9983e01
2 files changed
+77 -2

No files matched your search

+5 -2
View File
@@ -640,9 +640,12 @@ export function githubChatWizardService(
eq(toolConnections.companyId, bot.companyId),
),
);
const requiredCredentialKeys = session.handoff.manifestClaimId
? ["appId", "privateKey", "webhookSecret", "clientId", "clientSecret"]
: ["appId", "privateKey", "webhookSecret"];
let hasAppCredentials =
!!bot.botExternalId &&
["appId", "privateKey", "webhookSecret"].every((key) =>
requiredCredentialKeys.every((key) =>
connection?.refs.some(
(ref) => ref.configPath === `credentials.${key}`,
),
@@ -669,7 +672,7 @@ export function githubChatWizardService(
eq(toolConnections.companyId, bot.companyId),
),
);
hasAppCredentials = ["appId", "privateKey", "webhookSecret"].every(
hasAppCredentials = requiredCredentialKeys.every(
(key) =>
savedConnection?.refs.some(
(ref) => ref.configPath === `credentials.${key}`,