fix(mac,asr): harden menu-bar delivery, chunk retry, and polish validator

Retain the external target app for menu-bar paste and polish context, retry
failed middle ASR chunks once, and stop false-positive path/number violations.
This commit is contained in:
Rocky
2026-07-29 18:30:36 +08:00
parent 34be2e8dd1
commit 4c929d8b8b
17 changed files with 646 additions and 39 deletions
+8 -1
View File
@@ -8,7 +8,14 @@
@preconcurrency import AVFoundation
final class MacAudioRecorder: @unchecked Sendable {
protocol MacAudioRecording: Sendable {
func level() -> Float
func start() async throws
func makeSnapshotStream() -> AsyncStream<AudioBufferSnapshot>
func stop() -> [Float]
}
final class MacAudioRecorder: MacAudioRecording, @unchecked Sendable {
enum RecorderError: Error, LocalizedError {
case converterUnavailable
case microphoneAccessDenied