fix: reset Test button after validation completes

This commit is contained in:
dayuan.jiang
2025-12-22 20:11:46 +09:00
parent 56ca9d3f48
commit 1f6ef7ac90

View File

@@ -290,12 +290,12 @@ export function ModelConfigDialog({
setValidatingModelIndex(null)
if (allValid) {
setValidationStatus("success")
updateProvider(selectedProviderId!, { validated: true })
} 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