Skip to content

Commit e7edc73

Browse files
committed
Update window base command handler to also trigger animation
1 parent aa35079 commit e7edc73

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Core/Sources/Service/SuggestionCommandHandler/WindowBaseCommandHandler.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ struct WindowBaseCommandHandler: SuggestionCommandHanlder {
158158
}
159159

160160
func generateRealtimeSuggestions(editor: EditorContent) async throws -> UpdatedContent? {
161-
try await presentSuggestions(editor: editor)
161+
await GraphicalUserInterfaceController.shared.realtimeSuggestionIndicatorController
162+
.triggerPrefetchAnimation()
163+
defer {
164+
Task {
165+
await GraphicalUserInterfaceController.shared.realtimeSuggestionIndicatorController
166+
.endPrefetchAnimation()
167+
}
168+
}
169+
return try await presentSuggestions(editor: editor)
162170
}
163171
}

0 commit comments

Comments
 (0)