feat(keyboard): ship AI hint carousel, home library cards, and clipboard polish

Rotate AI idle suggestions with optional remote packs, move history/dictionary onto self-sizing Home preview cards, harden clipboard capture/prompting, and simplify keyboard chrome by dropping most liquid-glass shadows.
This commit is contained in:
Rocky
2026-08-13 01:00:51 +08:00
parent fd6e0d3e7e
commit 9f308fadd2
202 changed files with 10897 additions and 5962 deletions
@@ -8,6 +8,10 @@
import Foundation
/// Sendable facade over thread-safe UserDefaults, hence `@unchecked`; callers
/// must still serialize compound read-modify-write mutations. iOS requires the
/// App Group (except unsigned tests), while macOS may use `.standard`. API keys
/// are resolved from Keychain and never saved here.
public struct AppGroupStore: @unchecked Sendable {
public let defaults: UserDefaults
@@ -94,9 +98,6 @@ public struct AppGroupStore: @unchecked Sendable {
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 }
// MARK: - Writes
public func setModeId(_ id: String) {
@@ -208,6 +209,8 @@ public struct AppGroupStore: @unchecked Sendable {
set { setOnboardingPage(newValue) }
}
/// Commits onboarding to both the App Group and the reboot-durable
/// Keychain marker; callers must preserve this dual-write invariant.
public func setHasCompletedOnboarding(_ completed: Bool) {
mutateConfiguration { config in
config.hasCompletedOnboarding = completed