11import Foundation
2- import SuggestionModel
32import GitHubCopilotService
3+ import SuggestionModel
44
55public protocol SuggestionServiceType {
66 func getSuggestions(
@@ -13,7 +13,7 @@ public protocol SuggestionServiceType {
1313 ignoreSpaceOnlySuggestions: Bool ,
1414 referenceFileURL: [ URL ]
1515 ) async throws -> [ CodeSuggestion ]
16-
16+
1717 func notifyAccepted( _ suggestion: CodeSuggestion ) async
1818 func notifyRejected( _ suggestions: [ CodeSuggestion ] ) async
1919 func notifyOpenTextDocument( fileURL: URL , content: String ) async throws
@@ -24,11 +24,11 @@ public protocol SuggestionServiceType {
2424
2525public final class SuggestionService : SuggestionServiceType {
2626 let gitHubCopilotService : GitHubCopilotSuggestionServiceType
27-
27+
2828 public init ( projectRootURL: URL ) {
2929 gitHubCopilotService = GitHubCopilotSuggestionService ( projectRootURL: projectRootURL)
3030 }
31-
31+
3232 public func getSuggestions(
3333 fileURL: URL ,
3434 content: String ,
@@ -49,28 +49,29 @@ public final class SuggestionService: SuggestionServiceType {
4949 ignoreSpaceOnlySuggestions: ignoreSpaceOnlySuggestions
5050 )
5151 }
52-
52+
5353 public func notifyAccepted( _ suggestion: SuggestionModel . CodeSuggestion ) async {
5454 await gitHubCopilotService. notifyAccepted ( suggestion)
5555 }
56-
56+
5757 public func notifyRejected( _ suggestions: [ SuggestionModel . CodeSuggestion ] ) async {
5858 await gitHubCopilotService. notifyRejected ( suggestions)
5959 }
60-
60+
6161 public func notifyOpenTextDocument( fileURL: URL , content: String ) async throws {
6262 try await gitHubCopilotService. notifyOpenTextDocument ( fileURL: fileURL, content: content)
6363 }
64-
64+
6565 public func notifyChangeTextDocument( fileURL: URL , content: String ) async throws {
6666 try await gitHubCopilotService. notifyChangeTextDocument ( fileURL: fileURL, content: content)
6767 }
68-
68+
6969 public func notifyCloseTextDocument( fileURL: URL ) async throws {
7070 try await gitHubCopilotService. notifyCloseTextDocument ( fileURL: fileURL)
7171 }
72-
72+
7373 public func notifySaveTextDocument( fileURL: URL ) async throws {
7474 try await gitHubCopilotService. notifySaveTextDocument ( fileURL: fileURL)
7575 }
7676}
77+
0 commit comments