This commit is contained in:
Beingpax 2025-05-29 18:11:02 +05:45
parent 652fca9d87
commit 9b55bca292

View File

@ -134,13 +134,11 @@ class ActiveWindowService: ObservableObject {
}
}
// Capture screen context at the end after a brief delay to ensure all changes are settled
// and either enhancement is newly enabled or screen capture is newly enabled
if config.isAIEnhancementEnabled && config.useScreenCapture {
let shouldCaptureScreen = !wasEnhancementEnabled || !wasScreenCaptureEnabled
if shouldCaptureScreen {
// Wait a moment for UI changes and content loading to complete
// Wait a moment for UI changes and model loading to complete
try? await Task.sleep(nanoseconds: 1_500_000_000) // 1.5 seconds
await enhancementService.captureScreenContext()
}