@@ -22,9 +22,7 @@ public protocol GitHubCopilotSuggestionServiceType {
2222 cursorPosition: CursorPosition ,
2323 tabSize: Int ,
2424 indentSize: Int ,
25- usesTabsForIndentation: Bool ,
26- ignoreSpaceOnlySuggestions: Bool ,
27- ignoreTrailingNewLinesAndSpaces: Bool
25+ usesTabsForIndentation: Bool
2826 ) async throws -> [ CodeSuggestion ]
2927 func notifyAccepted( _ completion: CodeSuggestion ) async
3028 func notifyRejected( _ completions: [ CodeSuggestion ] ) async
@@ -340,9 +338,7 @@ public final class GitHubCopilotSuggestionService: GitHubCopilotBaseService,
340338 cursorPosition: CursorPosition ,
341339 tabSize: Int ,
342340 indentSize: Int ,
343- usesTabsForIndentation: Bool ,
344- ignoreSpaceOnlySuggestions: Bool ,
345- ignoreTrailingNewLinesAndSpaces: Bool
341+ usesTabsForIndentation: Bool
346342 ) async throws -> [ CodeSuggestion ] {
347343 let languageId = languageIdentifierFromFileURL ( fileURL)
348344
@@ -379,28 +375,13 @@ public final class GitHubCopilotSuggestionService: GitHubCopilotBaseService,
379375 position: cursorPosition
380376 ) ) )
381377 . completions
382- . filter { completion in
383- if ignoreSpaceOnlySuggestions {
384- return !completion. text. allSatisfy { $0. isWhitespace || $0. isNewline }
385- }
386- return true
387- }
388378 . map {
389379 let suggestion = CodeSuggestion (
390380 id: $0. uuid,
391381 text: $0. text,
392382 position: $0. position,
393383 range: $0. range
394384 )
395- if ignoreTrailingNewLinesAndSpaces {
396- var updated = suggestion
397- var text = updated. text [ ... ]
398- while let last = text. last, last. isNewline || last. isWhitespace {
399- text = text. dropLast ( 1 )
400- }
401- updated. text = String ( text)
402- return updated
403- }
404385 return suggestion
405386 }
406387 try Task . checkCancellation ( )
0 commit comments