mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-03 23:02:31 +08:00
fix: reset Test button after validation completes
This commit is contained in:
@@ -290,12 +290,12 @@ export function ModelConfigDialog({
|
|||||||
setValidatingModelIndex(null)
|
setValidatingModelIndex(null)
|
||||||
|
|
||||||
if (allValid) {
|
if (allValid) {
|
||||||
setValidationStatus("success")
|
|
||||||
updateProvider(selectedProviderId!, { validated: true })
|
updateProvider(selectedProviderId!, { validated: true })
|
||||||
} else {
|
} else {
|
||||||
setValidationStatus("error")
|
|
||||||
setValidationError(`${errorCount} model(s) failed validation`)
|
setValidationError(`${errorCount} model(s) failed validation`)
|
||||||
}
|
}
|
||||||
|
// Reset to idle so button shows "Test" again
|
||||||
|
setValidationStatus("idle")
|
||||||
}, [selectedProvider, selectedProviderId, updateProvider, updateModel])
|
}, [selectedProvider, selectedProviderId, updateProvider, updateModel])
|
||||||
|
|
||||||
// Get all available provider types
|
// Get all available provider types
|
||||||
|
|||||||
Reference in New Issue
Block a user