diff --git a/VoiceInk/Services/AIEnhancementService.swift b/VoiceInk/Services/AIEnhancementService.swift index d5042c5..e3f0fa1 100644 --- a/VoiceInk/Services/AIEnhancementService.swift +++ b/VoiceInk/Services/AIEnhancementService.swift @@ -399,13 +399,17 @@ class AIEnhancementService: ObservableObject { } func captureScreenContext() async { + guard CGPreflightScreenCaptureAccess() else { + return + } + if let capturedText = await screenCaptureService.captureAndExtractText() { await MainActor.run { self.objectWillChange.send() } } } - + func captureClipboardContext() { lastCapturedClipboard = NSPasteboard.general.string(forType: .string) }