Voice wake: send or dismiss on release

This commit is contained in:
Peter Steinberger
2025-12-09 02:25:06 +01:00
parent 3fe68a051a
commit 317f666d4c
3 changed files with 16 additions and 9 deletions

View File

@@ -137,12 +137,17 @@ actor VoicePushToTalk {
let chime = finalText.isEmpty ? .none : (self.activeConfig?.sendChime ?? .none)
await MainActor.run {
VoiceWakeOverlayController.shared.presentFinal(
transcript: finalText,
forwardConfig: forward,
delay: finalText.isEmpty ? 0.0 : 0.8,
sendChime: chime,
attributed: attributed)
if finalText.isEmpty {
VoiceWakeOverlayController.shared.dismiss(reason: .empty)
} else {
VoiceWakeOverlayController.shared.presentFinal(
transcript: finalText,
forwardConfig: forward,
autoSendAfter: nil,
sendChime: chime,
attributed: attributed)
VoiceWakeOverlayController.shared.sendNow(sendChime: chime)
}
}
self.committed = ""