Skip to content

Commit 6019536

Browse files
committed
Add loggings
1 parent 7895aeb commit 6019536

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Core/Sources/Service/AutoTrigger.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ public actor AutoTrigger {
8282
guard event.type == .keyUp,
8383
event.getIntegerValueField(.keyboardEventKeycode) != escape
8484
else { continue }
85+
86+
os_log(.info, "Prefetch suggestions.")
8587

8688
triggerTask = Task { @ServiceActor in
8789
try? await Task.sleep(nanoseconds: 1_500_000_000)
@@ -94,7 +96,11 @@ public actor AutoTrigger {
9496
workspaces[workspaceURL] = workspace
9597
guard workspace.isRealtimeSuggestionEnabled else { return }
9698
if Task.isCancelled { return }
97-
try? await Environment.triggerAction("Prefetch Suggestions")
99+
do {
100+
try await Environment.triggerAction("Prefetch Suggestions")
101+
} catch {
102+
os_log(.info, "%@", error.localizedDescription)
103+
}
98104
}
99105
}
100106
}

0 commit comments

Comments
 (0)