feat(macos): local ASR model manager, menu-bar polish, and release 0.5.2
Adds a bundled local ASR model catalog for the macOS app with one-click Sherpa Qwen3 / SenseVoice downloads (pause/resume, inline actions) and a shared model storage directory used by MLX Qwen3. Fixes the light-mode sidebar material and makes the menu-bar icon follow the system appearance with a refreshed status mark. Renames the built product to OSGKeyboard.app. Bumps version to 0.5.2 (build 19).
This commit is contained in:
@@ -252,7 +252,10 @@ public actor PolishingService {
|
||||
providerId: String
|
||||
) -> String {
|
||||
let dictionary = store.personalDictionary
|
||||
let dictionaryBlock = dictionary.promptFragment()
|
||||
let dictionaryBlock = Self.mergedDictionaryBlock(
|
||||
dictionary: dictionary,
|
||||
supplement: context.dictionarySupplement
|
||||
)
|
||||
let contextGuideline = context.appContext.polishGuideline
|
||||
let intensityGuideline = context.intensity.promptGuideline
|
||||
let contract = Self.globalOutputContract(useChinese: shouldUseChineseGuidance(providerId: providerId))
|
||||
@@ -321,6 +324,17 @@ public actor PolishingService {
|
||||
}
|
||||
}
|
||||
|
||||
internal static func mergedDictionaryBlock(
|
||||
dictionary: PersonalDictionary,
|
||||
supplement: String?
|
||||
) -> String {
|
||||
let base = dictionary.promptFragment()
|
||||
let extra = supplement?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
|
||||
if base.isEmpty { return extra }
|
||||
if extra.isEmpty { return base }
|
||||
return base + "\n" + extra
|
||||
}
|
||||
|
||||
private func shouldUseChineseGuidance(providerId: String) -> Bool {
|
||||
switch providerId {
|
||||
case "zhipu", "moonshot", "qwen", "deepseek":
|
||||
|
||||
Reference in New Issue
Block a user