diff --git a/src/hooks/useVisualConfig.ts b/src/hooks/useVisualConfig.ts index 7d116e2..ce52e43 100644 --- a/src/hooks/useVisualConfig.ts +++ b/src/hooks/useVisualConfig.ts @@ -745,120 +745,36 @@ function getNextDirtyFields( 'claudeHeaderStabilizeDeviceProfile', 'codexHeaderUserAgent', 'codexHeaderBetaFeatures', + 'host', + 'port', + 'tlsEnable', + 'tlsCert', + 'tlsKey', + 'rmAllowRemote', + 'rmSecretKey', + 'rmDisableControlPanel', + 'rmPanelRepo', + 'authDir', + 'apiKeysText', + 'debug', + 'commercialMode', + 'loggingToFile', + 'logsMaxTotalSizeMb', + 'proxyUrl', + 'forceModelPrefix', + 'requestRetry', + 'maxRetryCredentials', + 'maxRetryInterval', + 'wsAuth', + 'quotaSwitchProject', + 'quotaSwitchPreviewModel', + 'quotaAntigravityCredits', + 'routingStrategy', + 'routingSessionAffinity', + 'routingSessionAffinityTTL', ] as Array ).forEach(updateScalarDirty); - if (Object.prototype.hasOwnProperty.call(patch, 'host')) { - updateDirty('host', nextValues.host === baselineValues.host); - } - if (Object.prototype.hasOwnProperty.call(patch, 'port')) { - updateDirty('port', nextValues.port === baselineValues.port); - } - if (Object.prototype.hasOwnProperty.call(patch, 'tlsEnable')) { - updateDirty('tlsEnable', nextValues.tlsEnable === baselineValues.tlsEnable); - } - if (Object.prototype.hasOwnProperty.call(patch, 'tlsCert')) { - updateDirty('tlsCert', nextValues.tlsCert === baselineValues.tlsCert); - } - if (Object.prototype.hasOwnProperty.call(patch, 'tlsKey')) { - updateDirty('tlsKey', nextValues.tlsKey === baselineValues.tlsKey); - } - if (Object.prototype.hasOwnProperty.call(patch, 'rmAllowRemote')) { - updateDirty('rmAllowRemote', nextValues.rmAllowRemote === baselineValues.rmAllowRemote); - } - if (Object.prototype.hasOwnProperty.call(patch, 'rmSecretKey')) { - updateDirty('rmSecretKey', nextValues.rmSecretKey === baselineValues.rmSecretKey); - } - if (Object.prototype.hasOwnProperty.call(patch, 'rmDisableControlPanel')) { - updateDirty( - 'rmDisableControlPanel', - nextValues.rmDisableControlPanel === baselineValues.rmDisableControlPanel - ); - } - if (Object.prototype.hasOwnProperty.call(patch, 'rmPanelRepo')) { - updateDirty('rmPanelRepo', nextValues.rmPanelRepo === baselineValues.rmPanelRepo); - } - if (Object.prototype.hasOwnProperty.call(patch, 'authDir')) { - updateDirty('authDir', nextValues.authDir === baselineValues.authDir); - } - if (Object.prototype.hasOwnProperty.call(patch, 'apiKeysText')) { - updateDirty('apiKeysText', nextValues.apiKeysText === baselineValues.apiKeysText); - } - if (Object.prototype.hasOwnProperty.call(patch, 'debug')) { - updateDirty('debug', nextValues.debug === baselineValues.debug); - } - if (Object.prototype.hasOwnProperty.call(patch, 'commercialMode')) { - updateDirty('commercialMode', nextValues.commercialMode === baselineValues.commercialMode); - } - if (Object.prototype.hasOwnProperty.call(patch, 'loggingToFile')) { - updateDirty('loggingToFile', nextValues.loggingToFile === baselineValues.loggingToFile); - } - if (Object.prototype.hasOwnProperty.call(patch, 'logsMaxTotalSizeMb')) { - updateDirty( - 'logsMaxTotalSizeMb', - nextValues.logsMaxTotalSizeMb === baselineValues.logsMaxTotalSizeMb - ); - } - if (Object.prototype.hasOwnProperty.call(patch, 'proxyUrl')) { - updateDirty('proxyUrl', nextValues.proxyUrl === baselineValues.proxyUrl); - } - if (Object.prototype.hasOwnProperty.call(patch, 'forceModelPrefix')) { - updateDirty( - 'forceModelPrefix', - nextValues.forceModelPrefix === baselineValues.forceModelPrefix - ); - } - if (Object.prototype.hasOwnProperty.call(patch, 'requestRetry')) { - updateDirty('requestRetry', nextValues.requestRetry === baselineValues.requestRetry); - } - if (Object.prototype.hasOwnProperty.call(patch, 'maxRetryCredentials')) { - updateDirty( - 'maxRetryCredentials', - nextValues.maxRetryCredentials === baselineValues.maxRetryCredentials - ); - } - if (Object.prototype.hasOwnProperty.call(patch, 'maxRetryInterval')) { - updateDirty( - 'maxRetryInterval', - nextValues.maxRetryInterval === baselineValues.maxRetryInterval - ); - } - if (Object.prototype.hasOwnProperty.call(patch, 'wsAuth')) { - updateDirty('wsAuth', nextValues.wsAuth === baselineValues.wsAuth); - } - if (Object.prototype.hasOwnProperty.call(patch, 'quotaSwitchProject')) { - updateDirty( - 'quotaSwitchProject', - nextValues.quotaSwitchProject === baselineValues.quotaSwitchProject - ); - } - if (Object.prototype.hasOwnProperty.call(patch, 'quotaSwitchPreviewModel')) { - updateDirty( - 'quotaSwitchPreviewModel', - nextValues.quotaSwitchPreviewModel === baselineValues.quotaSwitchPreviewModel - ); - } - if (Object.prototype.hasOwnProperty.call(patch, 'quotaAntigravityCredits')) { - updateDirty( - 'quotaAntigravityCredits', - nextValues.quotaAntigravityCredits === baselineValues.quotaAntigravityCredits - ); - } - if (Object.prototype.hasOwnProperty.call(patch, 'routingStrategy')) { - updateDirty('routingStrategy', nextValues.routingStrategy === baselineValues.routingStrategy); - } - if (Object.prototype.hasOwnProperty.call(patch, 'routingSessionAffinity')) { - updateDirty( - 'routingSessionAffinity', - nextValues.routingSessionAffinity === baselineValues.routingSessionAffinity - ); - } - if (Object.prototype.hasOwnProperty.call(patch, 'routingSessionAffinityTTL')) { - updateDirty( - 'routingSessionAffinityTTL', - nextValues.routingSessionAffinityTTL === baselineValues.routingSessionAffinityTTL - ); - } if (Object.prototype.hasOwnProperty.call(patch, 'payloadDefaultRules')) { updateDirty( 'payloadDefaultRules',