| import { |
| getMainLoopModelOverride, |
| setMainLoopModelOverride, |
| } from '../bootstrap/state.js' |
| import { getGlobalConfig, saveGlobalConfig } from '../utils/config.js' |
| import { |
| getSettingsForSource, |
| updateSettingsForSource, |
| } from '../utils/settings/settings.js' |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| export function migrateSonnet1mToSonnet45(): void { |
| const config = getGlobalConfig() |
| if (config.sonnet1m45MigrationComplete) { |
| return |
| } |
|
|
| const model = getSettingsForSource('userSettings')?.model |
| if (model === 'sonnet[1m]') { |
| updateSettingsForSource('userSettings', { |
| model: 'sonnet-4-5-20250929[1m]', |
| }) |
| } |
|
|
| |
| const override = getMainLoopModelOverride() |
| if (override === 'sonnet[1m]') { |
| setMainLoopModelOverride('sonnet-4-5-20250929[1m]') |
| } |
|
|
| saveGlobalConfig(current => ({ |
| ...current, |
| sonnet1m45MigrationComplete: true, |
| })) |
| } |
|
|