Skip to content

Commit 483e162

Browse files
committed
Handle unsupported language name set in previous version
1 parent d99ca69 commit 483e162

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Copilot for Xcode/OpenAIView.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ struct OpenAIView: View {
4242

4343
HStack {
4444
Picker(selection: $settings.chatGPTModel) {
45+
if !settings.chatGPTModel.isEmpty,
46+
ChatGPTModel(rawValue: settings.chatGPTModel) == nil
47+
{
48+
Text(settings.chatGPTModel).tag(settings.chatGPTModel)
49+
}
4550
ForEach(ChatGPTModel.allCases, id: \.self) { model in
4651
Text(model.rawValue).tag(model.rawValue)
4752
}

0 commit comments

Comments
 (0)