@@ -20,6 +20,7 @@ struct ChatSettingsView: View {
2020 @AppStorage ( \. chatFeatureProvider) var chatFeatureProvider
2121 @AppStorage ( \. chatGPTModel) var chatGPTModel
2222 @AppStorage ( \. defaultChatSystemPrompt) var defaultChatSystemPrompt
23+ @AppStorage ( \. chatSearchPluginMaxIterations) var chatSearchPluginMaxIterations
2324
2425 init ( ) { }
2526 }
@@ -36,6 +37,8 @@ struct ChatSettingsView: View {
3637 uiForm
3738 Divider ( )
3839 contextForm
40+ Divider ( )
41+ pluginForm
3942 }
4043 }
4144
@@ -123,7 +126,7 @@ struct ChatSettingsView: View {
123126 Text ( " 9 Messages " ) . tag ( 9 )
124127 Text ( " 11 Messages " ) . tag ( 11 )
125128 }
126-
129+
127130 VStack ( alignment: . leading, spacing: 4 ) {
128131 Text ( " Default System Prompt " )
129132 EditableText ( text: $settings. defaultChatSystemPrompt)
@@ -178,7 +181,7 @@ struct ChatSettingsView: View {
178181 Toggle ( isOn: $settings. useSelectionScopeByDefaultInChatContext) {
179182 Text ( " Use selection scope by default in chat context. " )
180183 }
181-
184+
182185 Toggle ( isOn: $settings. embedFileContentInChatContextIfNoSelection) {
183186 Text ( " Embed file content in chat context if no code is selected. " )
184187 }
@@ -198,6 +201,20 @@ struct ChatSettingsView: View {
198201 }
199202 }
200203
204+ @ViewBuilder
205+ var pluginForm : some View {
206+ Form {
207+ TextField ( text: . init( get: {
208+ " \( Int ( settings. chatSearchPluginMaxIterations) ) "
209+ } , set: {
210+ settings. chatSearchPluginMaxIterations = Int ( $0) ?? 0
211+ } ) ) {
212+ Text ( " Search Plugin Max Iterations " )
213+ }
214+ . textFieldStyle ( . roundedBorder)
215+ }
216+ }
217+
201218 var languagePicker : some View {
202219 Menu {
203220 if !settings. chatGPTLanguage. isEmpty,
0 commit comments