feat(typing): wire PersonalDictionary into Chinese Pinyin via Rime sidecar

Redeploy an osg_personal import table on dictionary add/delete/sync so
Chinese, English typing, and ASR share one curated lexicon (next keyboard open).
This commit is contained in:
Rocky
2026-08-05 22:12:30 +08:00
parent 31f5937a7f
commit 717902716a
11 changed files with 665 additions and 14 deletions
@@ -225,6 +225,10 @@ public struct AppGroupStore: @unchecked Sendable {
public func setPersonalDictionary(_ dictionary: PersonalDictionary) {
mutateConfiguration { $0.personalDictionary = dictionary }
AppGroupConfigDarwin.postConfigChanged()
#if os(iOS)
// Host redeploys Rime sidecar; extension picks it up next typing open.
PersonalDictionaryRimeSync.scheduleAfterDictionaryChange()
#endif
}
public func deletePersonalDictionaryEntry(id: UUID, at date: Date = Date()) {
@@ -233,6 +237,9 @@ public struct AppGroupStore: @unchecked Sendable {
config.personalDictionary.deletedEntryIDs[id] = date
}
AppGroupConfigDarwin.postConfigChanged()
#if os(iOS)
PersonalDictionaryRimeSync.scheduleAfterDictionaryChange()
#endif
}
public var personalDictionaryICloudSyncEnabled: Bool {