Skip to content

Commit b14f98d

Browse files
committed
Add temporary picker for suggestion feature provider
1 parent 1434909 commit b14f98d

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Copilot for Xcode/SettingsView.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ struct SettingsView: View {
3131
@AppStorage(\.suggestionCodeFontSize) var suggestionCodeFontSize
3232
@AppStorage(\.chatFontSize) var chatFontSize
3333
@AppStorage(\.chatCodeFontSize) var chatCodeFontSize
34+
@AppStorage(\.suggestionFeatureProvider) var suggestionFeatureProvider
3435
init() {}
3536
}
3637

@@ -79,6 +80,19 @@ struct SettingsView: View {
7980
} label: {
8081
Text("Present suggestions in")
8182
}
83+
84+
Picker(selection: $settings.suggestionFeatureProvider) {
85+
ForEach(SuggestionFeatureProvider.allCases, id: \.rawValue) {
86+
switch $0 {
87+
case .gitHubCopilot:
88+
Text("GitHub Copilot").tag($0)
89+
case .codeium:
90+
Text("Codeium").tag($0)
91+
}
92+
}
93+
} label: {
94+
Text("Generate suggestion with")
95+
}
8296

8397
if settings.suggestionPresentationMode == PresentationMode.floatingWidget {
8498
Picker(selection: $settings.suggestionWidgetPositionMode) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22

3-
public enum SuggestionFeatureProvider: Int {
3+
public enum SuggestionFeatureProvider: Int, CaseIterable {
44
case gitHubCopilot
55
case codeium
66
}

0 commit comments

Comments
 (0)