File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Core/Sources/Service/SuggestionCommandHandler Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -139,11 +139,17 @@ struct WindowBaseCommandHandler: SuggestionCommandHandler {
139139 func acceptSuggestion( editor: EditorContent ) async throws -> UpdatedContent ? {
140140 presenter. markAsProcessing ( true )
141141 defer { presenter. markAsProcessing ( false ) }
142- Task {
143- let fileURL = try await Environment . fetchCurrentFileURL ( )
144- presenter. discardSuggestion ( fileURL: fileURL)
142+
143+ do {
144+ let result = try await CommentBaseCommandHandler ( ) . acceptSuggestion ( editor: editor)
145+ Task {
146+ let fileURL = try await Environment . fetchCurrentFileURL ( )
147+ presenter. discardSuggestion ( fileURL: fileURL)
148+ }
149+ return result
150+ } catch {
151+ throw error
145152 }
146- return try await CommentBaseCommandHandler ( ) . acceptSuggestion ( editor: editor)
147153 }
148154
149155 func presentRealtimeSuggestions( editor: EditorContent ) async throws -> UpdatedContent ? {
You can’t perform that action at this time.
0 commit comments