From a4853f2faabfc5487da67e65ca6c580617c82583 Mon Sep 17 00:00:00 2001 From: Felix NyxJae <52313587+NyxJae@users.noreply.github.com> Date: Tue, 18 Mar 2025 13:51:14 +0800 Subject: [PATCH] fix Human Relay not working up on welcome screen (#1759) * fix: Add special handling to human-relay providers, optimize configuration check logic * fix: Remove the debug log in the checkExistKey function --- src/shared/checkExistApiConfig.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shared/checkExistApiConfig.ts b/src/shared/checkExistApiConfig.ts index c141a153d2..77b58fa31f 100644 --- a/src/shared/checkExistApiConfig.ts +++ b/src/shared/checkExistApiConfig.ts @@ -4,6 +4,11 @@ import { SECRET_KEYS } from "./globalState" export function checkExistKey(config: ApiConfiguration | undefined) { if (!config) return false + // Special case for human-relay provider which doesn't need any configuration + if (config.apiProvider === "human-relay") { + return true + } + // Check all secret keys from the centralized SECRET_KEYS array const hasSecretKey = SECRET_KEYS.some((key) => config[key as keyof ApiConfiguration] !== undefined)