Skip to content

Commit 147ee41

Browse files
committed
Rename SuggestionFeatureProvider to BuiltInXXX
1 parent f9b673b commit 147ee41

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

Core/Sources/HostApp/FeatureSettings/SuggestionSettingsView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct SuggestionSettingsView: View {
5353
}
5454

5555
Picker(selection: $settings.suggestionFeatureProvider) {
56-
ForEach(SuggestionFeatureProvider.allCases, id: \.rawValue) {
56+
ForEach(BuiltInSuggestionFeatureProvider.allCases, id: \.rawValue) {
5757
switch $0 {
5858
case .gitHubCopilot:
5959
Text("GitHub Copilot").tag($0)

Tool/Sources/Preferences/Keys.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public extension UserDefaultPreferenceKeys {
286286
// MARK: - Suggestion
287287

288288
public extension UserDefaultPreferenceKeys {
289-
var suggestionFeatureProvider: PreferenceKey<SuggestionFeatureProvider> {
289+
var suggestionFeatureProvider: PreferenceKey<BuiltInSuggestionFeatureProvider> {
290290
.init(defaultValue: .gitHubCopilot, key: "SuggestionFeatureProvider")
291291
}
292292

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import Foundation
22

3-
public enum SuggestionFeatureProvider: Int, CaseIterable {
3+
public enum BuiltInSuggestionFeatureProvider: Int, CaseIterable, Codable {
44
case gitHubCopilot
55
case codeium
66
}
7+
8+
public enum SuggestionFeatureProvider: Codable {
9+
case builtIn(BuiltInSuggestionFeatureProvider)
10+
case extended(name: String, bundleIdentifier: String)
11+
}
12+

Tool/Sources/SuggestionService/SuggestionService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public actor SuggestionService: SuggestionServiceType {
9494

9595
lazy var suggestionProvider: SuggestionServiceProvider = buildService()
9696

97-
var serviceType: SuggestionFeatureProvider {
97+
var serviceType: BuiltInSuggestionFeatureProvider {
9898
UserDefaults.shared.value(for: \.suggestionFeatureProvider)
9999
}
100100

0 commit comments

Comments
 (0)