Sync starred models across machines; add automatic backup scheduling
Favorites now push/pull through a small oai_favorites.json file in the same iCloud Drive folder used by Settings > Backup, reconciled by last-write-wins timestamp on launch and app-become-active. Also adds an Off/Daily/Weekly frequency picker so the full settings backup can run itself (checked at launch and hourly) instead of requiring a manual "Back Up Now" click every time.
This commit is contained in:
@@ -43,6 +43,11 @@ struct oAIApp: App {
|
||||
await GitSyncService.shared.syncOnStartup()
|
||||
}
|
||||
|
||||
// Reconcile starred models with the iCloud copy (cross-machine favorites sync)
|
||||
Task {
|
||||
await BackupService.shared.syncFavoritesOnLaunch()
|
||||
}
|
||||
|
||||
// Check for updates in the background
|
||||
UpdateCheckService.shared.checkForUpdates()
|
||||
}
|
||||
@@ -56,6 +61,11 @@ struct oAIApp: App {
|
||||
AboutView()
|
||||
}
|
||||
#if os(macOS)
|
||||
.onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ in
|
||||
Task {
|
||||
await BackupService.shared.syncFavoritesOnLaunch()
|
||||
}
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: NSApplication.willTerminateNotification)) { _ in
|
||||
Task { @MainActor in ExternalMCPManager.shared.stopAll() }
|
||||
Task {
|
||||
|
||||
Reference in New Issue
Block a user