feat: iCloud settings sync and cold-start return redesign
- Add iCloud key-value settings sync (engine/language/polish/Flow prefs); API keys stay on-device. New "Sync settings via iCloud" toggle. - Redesign cold-start handoff: bottom-bar left-to-right swipe guidance, auto-dismiss on app switch, tap-anywhere to close, retained return link. - Harden keyboard->app handoff with host-disconnected hint. - Include prior Unreleased ASR fixes (route-change crash, fallback warning, multi-utterance recognition, local ASR diagnostics). Release 0.5.0 (build 18).
This commit is contained in:
@@ -57,6 +57,7 @@ public struct AppGroupStore: @unchecked Sendable {
|
||||
public var polishModeForPipeline: PolishingService.PolishMode { configuration.polishModeForPipeline }
|
||||
public var polishProviderIdOverride: String? { configuration.polishProviderIdOverride }
|
||||
public var isCloudAPIKeyMissingForVoiceInput: Bool { configuration.isCloudAPIKeyMissingForVoiceInput }
|
||||
public var localASRCustomLanguageModelEnabled: Bool { configuration.localASRCustomLanguageModelEnabled }
|
||||
|
||||
/// Whether the keyboard top-bar translation chip should render.
|
||||
public var isTranslationChipVisible: Bool { true }
|
||||
@@ -112,6 +113,10 @@ public struct AppGroupStore: @unchecked Sendable {
|
||||
mutateConfiguration { $0.polishIntensity = intensity }
|
||||
}
|
||||
|
||||
public func setLocalASRCustomLanguageModelEnabled(_ enabled: Bool) {
|
||||
mutateConfiguration { $0.localASRCustomLanguageModelEnabled = enabled }
|
||||
}
|
||||
|
||||
public var hasCompletedOnboarding: Bool {
|
||||
get { configuration.hasCompletedOnboarding }
|
||||
set { setHasCompletedOnboarding(newValue) }
|
||||
@@ -129,6 +134,8 @@ public struct AppGroupStore: @unchecked Sendable {
|
||||
config.onboardingPage = 0
|
||||
}
|
||||
}
|
||||
// Mirror to the reboot-durable Keychain marker (keyboard-side completion).
|
||||
Keychain.setOnboardingCompleted(completed)
|
||||
}
|
||||
|
||||
public func setOnboardingPage(_ page: Int) {
|
||||
@@ -167,6 +174,22 @@ public struct AppGroupStore: @unchecked Sendable {
|
||||
mutateConfiguration { $0.personalDictionaryICloudSyncEnabled = enabled }
|
||||
}
|
||||
|
||||
public var settingsICloudSyncEnabled: Bool {
|
||||
get { configuration.settingsICloudSyncEnabled }
|
||||
set { setSettingsICloudSyncEnabled(newValue) }
|
||||
}
|
||||
|
||||
public func setSettingsICloudSyncEnabled(_ enabled: Bool) {
|
||||
mutateConfiguration { $0.settingsICloudSyncEnabled = enabled }
|
||||
}
|
||||
|
||||
/// Timestamp of the last settings blob applied from iCloud KVS.
|
||||
public var settingsCloudUpdatedAt: Date? {
|
||||
let raw = defaults.double(forKey: AppGroupConfiguration.Keys.settingsCloudUpdatedAt)
|
||||
guard raw > 0 else { return nil }
|
||||
return Date(timeIntervalSince1970: raw)
|
||||
}
|
||||
|
||||
// MARK: - Client
|
||||
|
||||
public func makeClient() -> LLMClient {
|
||||
|
||||
Reference in New Issue
Block a user