|
|
@@ -218,7 +218,15 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
|
|
|
return prevState
|
|
|
}
|
|
|
|
|
|
- setChangeDetected(true)
|
|
|
+ const previousValue = prevState.apiConfiguration?.[field]
|
|
|
+
|
|
|
+ // Don't treat initial sync from undefined to a defined value as a user change
|
|
|
+ // This prevents the dirty state when the component initializes and auto-syncs the model ID
|
|
|
+ const isInitialSync = previousValue === undefined && value !== undefined
|
|
|
+
|
|
|
+ if (!isInitialSync) {
|
|
|
+ setChangeDetected(true)
|
|
|
+ }
|
|
|
return { ...prevState, apiConfiguration: { ...prevState.apiConfiguration, [field]: value } }
|
|
|
})
|
|
|
},
|