File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1+ import BuiltinExtension
12import CopilotForXcodeKit
23import Foundation
3- import Workspace
44import Logger
5- import BuiltinExtension
5+ import Preferences
6+ import Workspace
67
78public final class CodeiumExtension : BuiltinExtension {
9+ public var suggestionServiceId : Preferences . BuiltInSuggestionFeatureProvider { . codeium }
10+
811 public var suggestionService : SuggestionServiceType ? { _suggestionService }
912 public var chatService : ChatServiceType ? { nil }
1013 public var promptToCodeService : PromptToCodeServiceType ? { nil }
@@ -68,7 +71,7 @@ public final class CodeiumExtension: BuiltinExtension {
6871 let fileSize = attrs [ FileAttributeKey . size] as? UInt64 ,
6972 fileSize > 15 * 1024 * 1024
7073 { return }
71-
74+
7275 Task {
7376 do {
7477 let content = try String ( contentsOf: documentURL, encoding: . utf8)
@@ -89,7 +92,7 @@ public final class CodeiumExtension: BuiltinExtension {
8992 }
9093 }
9194 }
92-
95+
9396 public func terminate( ) {
9497 for workspace in workspacePool. workspaces. values {
9598 guard let plugin = workspace. plugin ( for: CodeiumWorkspacePlugin . self)
Original file line number Diff line number Diff line change 1+ import BuiltinExtension
12import CopilotForXcodeKit
23import Foundation
3- import Workspace
44import Logger
5- import BuiltinExtension
5+ import Preferences
6+ import Workspace
67
78public final class GitHubCopilotExtension : BuiltinExtension {
9+ public var suggestionServiceId : Preferences . BuiltInSuggestionFeatureProvider { . gitHubCopilot }
10+
811 public var suggestionService : SuggestionServiceType ? { _suggestionService }
912 public var chatService : ChatServiceType ? { nil }
1013 public var promptToCodeService : PromptToCodeServiceType ? { nil }
@@ -75,7 +78,7 @@ public final class GitHubCopilotExtension: BuiltinExtension {
7578 let fileSize = attrs [ FileAttributeKey . size] as? UInt64 ,
7679 fileSize > 15 * 1024 * 1024
7780 { return }
78-
81+
7982 Task {
8083 do {
8184 let content = try String ( contentsOf: documentURL, encoding: . utf8)
@@ -96,7 +99,7 @@ public final class GitHubCopilotExtension: BuiltinExtension {
9699 }
97100 }
98101 }
99-
102+
100103 public func terminate( ) {
101104 for workspace in workspacePool. workspaces. values {
102105 guard let plugin = workspace. plugin ( for: GitHubCopilotWorkspacePlugin . self)
You can’t perform that action at this time.
0 commit comments