File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Core/Sources/Service/SuggestionCommandHandler Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,14 @@ struct WindowBaseCommandHandler: SuggestionCommandHanlder {
2424
2525 private func _presentSuggestions( editor: EditorContent ) async throws {
2626 presenter. markAsProcessing ( true )
27- defer { presenter. markAsProcessing ( false ) }
27+ defer {
28+ presenter. markAsProcessing ( false )
29+ Task {
30+ await GraphicalUserInterfaceController . shared
31+ . realtimeSuggestionIndicatorController
32+ . endPrefetchAnimation ( )
33+ }
34+ }
2835 let fileURL = try await Environment . fetchCurrentFileURL ( )
2936 let ( workspace, filespace) = try await Workspace
3037 . fetchOrCreateWorkspaceIfNeeded ( fileURL: fileURL)
@@ -160,12 +167,6 @@ struct WindowBaseCommandHandler: SuggestionCommandHanlder {
160167 func generateRealtimeSuggestions( editor: EditorContent ) async throws -> UpdatedContent ? {
161168 await GraphicalUserInterfaceController . shared. realtimeSuggestionIndicatorController
162169 . triggerPrefetchAnimation ( )
163- defer {
164- Task {
165- await GraphicalUserInterfaceController . shared. realtimeSuggestionIndicatorController
166- . endPrefetchAnimation ( )
167- }
168- }
169170 return try await presentSuggestions ( editor: editor)
170171 }
171172}
You can’t perform that action at this time.
0 commit comments