feat(polish): allow mood emoji on custom styles and ship Flow/ASR fixes

Custom polish styles can opt in to emotion-matched emoji (default off), with
prompt-level opt-in detection so paste-only styles keep model-added emoji.
Also include Volcengine API-Key ASR auth, voice-processing capture, PiP flash
fix, and related keyboard Shift/haptics reliability work.
This commit is contained in:
Rocky
2026-08-06 15:11:12 +08:00
parent 2ed16e1fbf
commit a8d58d8f0c
47 changed files with 1467 additions and 258 deletions
@@ -42,20 +42,22 @@ public enum TypingAutocapitalization: Sendable {
private static func needsSentenceCapitalization(_ preceding: String?) -> Bool {
guard let preceding, !preceding.isEmpty else { return true }
// Walk backward past trailing whitespace / newlines; capitalize when
// the field is empty or the previous visible character ends a sentence.
// Walk backward from the caret. Trailing spaces are ignored; a newline
// itself starts a new line (system .sentences behavior, e.g. Notes
// after Return). Otherwise capitalize only after a sentence terminator.
var index = preceding.endIndex
var sawContent = false
while index > preceding.startIndex {
index = preceding.index(before: index)
let character = preceding[index]
if character.isWhitespace || character.isNewline {
if character.isNewline {
return true
}
if character.isWhitespace {
continue
}
sawContent = true
return isSentenceTerminator(character)
}
return !sawContent
return true
}
private static func isSentenceTerminator(_ character: Character) -> Bool {