()
| 324 | // Bump this when adding a new sync migration so existing users re-run the set. |
| 325 | const CURRENT_MIGRATION_VERSION = 11; |
| 326 | function runMigrations(): void { |
| 327 | if (getGlobalConfig().migrationVersion !== CURRENT_MIGRATION_VERSION) { |
| 328 | migrateAutoUpdatesToSettings(); |
| 329 | migrateBypassPermissionsAcceptedToSettings(); |
| 330 | migrateEnableAllProjectMcpServersToSettings(); |
| 331 | resetProToOpusDefault(); |
| 332 | migrateSonnet1mToSonnet45(); |
| 333 | migrateLegacyOpusToCurrent(); |
| 334 | migrateSonnet45ToSonnet46(); |
| 335 | migrateOpusToOpus1m(); |
| 336 | migrateReplBridgeEnabledToRemoteControlAtStartup(); |
| 337 | if (feature('TRANSCRIPT_CLASSIFIER')) { |
| 338 | resetAutoModeOptInForDefaultOffer(); |
| 339 | } |
| 340 | if ("external" === 'ant') { |
| 341 | migrateFennecToOpus(); |
| 342 | } |
| 343 | saveGlobalConfig(prev => prev.migrationVersion === CURRENT_MIGRATION_VERSION ? prev : { |
| 344 | ...prev, |
| 345 | migrationVersion: CURRENT_MIGRATION_VERSION |
| 346 | }); |
| 347 | } |
| 348 | // Async migration - fire and forget since it's non-blocking |
| 349 | migrateChangelogFromConfig().catch(() => { |
| 350 | // Silently ignore migration errors - will retry on next startup |
| 351 | }); |
| 352 | } |
| 353 | |
| 354 | /** |
| 355 | * Prefetch system context (including git status) only when it's safe to do so. |
no test coverage detected