Skip to content

Commit 8db2391

Browse files
committed
Fix that command could be triggered when Xcode is not active
1 parent 3eb3417 commit 8db2391

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Core/Sources/Service/RealtimeSuggestionController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public actor RealtimeSuggestionController {
113113

114114
Task { @WorkspaceActor in // Get cache ready for real-time suggestions.
115115
guard UserDefaults.shared.value(for: \.preCacheOnFileOpen) else { return }
116+
guard await XcodeInspector.shared.activeApplication?.isXcode ?? false else { return }
116117
guard let fileURL = XcodeInspector.shared.realtimeActiveDocumentURL
117118
else { return }
118119
let (_, filespace) = try await Service.shared.workspacePool

0 commit comments

Comments
 (0)