Skip the screen recording permission prompt if not provided.

This commit is contained in:
Beingpax 2025-11-01 10:34:31 +05:45
parent f223a74194
commit a69f0239b1

View File

@ -399,13 +399,17 @@ class AIEnhancementService: ObservableObject {
} }
func captureScreenContext() async { func captureScreenContext() async {
guard CGPreflightScreenCaptureAccess() else {
return
}
if let capturedText = await screenCaptureService.captureAndExtractText() { if let capturedText = await screenCaptureService.captureAndExtractText() {
await MainActor.run { await MainActor.run {
self.objectWillChange.send() self.objectWillChange.send()
} }
} }
} }
func captureClipboardContext() { func captureClipboardContext() {
lastCapturedClipboard = NSPasteboard.general.string(forType: .string) lastCapturedClipboard = NSPasteboard.general.string(forType: .string)
} }