(value: string | null)
| 255 | const autoUpdaterDisabledReason = getAutoUpdaterDisabledReason(); |
| 256 | |
| 257 | function onChangeMainModelConfig(value: string | null): void { |
| 258 | const previousModel = mainLoopModel; |
| 259 | logEvent('tengu_config_model_changed', { |
| 260 | from_model: previousModel as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, |
| 261 | to_model: value as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, |
| 262 | }); |
| 263 | setAppState(prev => ({ |
| 264 | ...prev, |
| 265 | mainLoopModel: value, |
| 266 | mainLoopModelForSession: null, |
| 267 | })); |
| 268 | setChanges(prev => { |
| 269 | const valStr = |
| 270 | modelDisplayString(value) + |
| 271 | (isBilledAsExtraUsage(value, false, isOpus1mMergeEnabled()) ? ' · Billed as extra usage' : ''); |
| 272 | if ('model' in prev) { |
| 273 | const { model, ...rest } = prev; |
| 274 | return { ...rest, model: valStr }; |
| 275 | } |
| 276 | return { ...prev, model: valStr }; |
| 277 | }); |
| 278 | } |
| 279 | |
| 280 | function onChangeVerbose(value: boolean): void { |
| 281 | // Update the global config to persist the setting |
no test coverage detected