From 1be0cfa06ca8e7660b8746b5660e2f4cce49c15f Mon Sep 17 00:00:00 2001 From: "dayuan.jiang" Date: Mon, 22 Dec 2025 20:13:57 +0900 Subject: [PATCH] fix: reset validation button to Test after success --- components/model-config-dialog.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/model-config-dialog.tsx b/components/model-config-dialog.tsx index 2692376..899440a 100644 --- a/components/model-config-dialog.tsx +++ b/components/model-config-dialog.tsx @@ -290,12 +290,14 @@ export function ModelConfigDialog({ setValidatingModelIndex(null) if (allValid) { + setValidationStatus("success") updateProvider(selectedProviderId!, { validated: true }) + // Reset to idle after showing success briefly + setTimeout(() => setValidationStatus("idle"), 1500) } else { + setValidationStatus("error") setValidationError(`${errorCount} model(s) failed validation`) } - // Reset to idle so button shows "Test" again - setValidationStatus("idle") }, [selectedProvider, selectedProviderId, updateProvider, updateModel]) // Get all available provider types