feat(keyboard): add clipboard AI skills, hint keywords, and voice session fixes

Idle chips show entities with category icons; a fresh copy surfaces Reply/Summarize/Translate; abort/cancel/empty-tap no longer leave the mic stuck.
This commit is contained in:
Rocky
2026-08-13 15:47:32 +08:00
parent 9f308fadd2
commit 631617ee53
48 changed files with 1627 additions and 345 deletions
@@ -25,6 +25,45 @@ public struct TranslationLanguage: Identifiable, Hashable, Sendable {
self.promptLanguageName = promptLanguageName
self.nativeName = nativeName
}
/// One-character Chinese token for compact chips such as.
public var chineseShort: String {
switch id {
case "en": return ""
case "zh-Hans": return ""
case "zh-Hant": return ""
case "ja": return ""
case "ko": return ""
case "fr": return ""
case "de": return ""
case "es": return "西"
case "ru": return ""
case "pt": return ""
default: return nativeName
}
}
/// Country-style English code for compact chips such asTo JP.
public var englishShort: String {
switch id {
case "en": return "EN"
case "zh-Hans": return "CN"
case "zh-Hant": return "TW"
case "ja": return "JP"
case "ko": return "KR"
case "fr": return "FR"
case "de": return "DE"
case "es": return "ES"
case "ru": return "RU"
case "pt": return "PT"
default: return id.uppercased()
}
}
/// True when this target is a Chinese script ( or ).
public var isChineseScript: Bool {
id == "zh-Hans" || id == "zh-Hant"
}
}
public enum TranslationLanguageCatalog {