mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 22:32:27 +08:00
fix: reset Test button after validation completes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user