mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-22 21:23:02 +01:00
* ios: add off-by-default Apple Intelligence transcript cleanup experiment * ios: let nonisolated settings read the app group id * ios: reject added negations and stop cancelled cleanup work
20 lines
680 B
Swift
20 lines
680 B
Swift
import Foundation
|
|
|
|
/// The Apple Intelligence cleanup experiment's switch in the shared App Group.
|
|
nonisolated struct AppleIntelligenceCleanupSettings {
|
|
private enum Key {
|
|
static let cleanup = "experiments.appleIntelligenceCleanup"
|
|
}
|
|
|
|
private let defaults: UserDefaults?
|
|
|
|
init(defaults: UserDefaults? = UserDefaults(suiteName: KeyboardBridge.appGroup)) {
|
|
self.defaults = defaults
|
|
}
|
|
|
|
/// Experiment: one on-device pass fixes misheard words after dictation. Off by default.
|
|
var isEnabled: Bool {
|
|
get { defaults?.bool(forKey: Key.cleanup) ?? false }
|
|
nonmutating set { defaults?.set(newValue, forKey: Key.cleanup) }
|
|
}
|
|
}
|