From a32cd262cea5a4d11b5ba64a344dcabb3f46e5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=97=8D+85CD?= <50108258+kwaa@users.noreply.github.com> Date: Fri, 17 Oct 2025 14:50:59 +0800 Subject: [PATCH] fix(providers): validate configured providers only (#656) --- packages/stage-ui/src/stores/providers.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/stage-ui/src/stores/providers.ts b/packages/stage-ui/src/stores/providers.ts index 12d05b835..8d2e13a3c 100644 --- a/packages/stage-ui/src/stores/providers.ts +++ b/packages/stage-ui/src/stores/providers.ts @@ -1779,16 +1779,18 @@ export const useProvidersStore = defineStore('providers', () => { // Initialize all providers Object.keys(providerMetadata).forEach(initializeProvider) - // Update configuration status for all providers + // Update configuration status for all configured providers async function updateConfigurationStatus() { - await Promise.all(Object.keys(providerMetadata).map(async (providerId) => { - try { - configuredProviders.value[providerId] = await validateProvider(providerId) - } - catch { - configuredProviders.value[providerId] = false - } - })) + await Promise.all(Object.entries(providerMetadata) + .filter(([_, v]) => v.configured) + .map(async ([providerId]) => { + try { + configuredProviders.value[providerId] = await validateProvider(providerId) + } + catch { + configuredProviders.value[providerId] = false + } + })) } // Call initially and watch for changes