@@ -11,6 +11,7 @@ import { Button, Input, Slider } from "@/components/ui"
1111import { SetCachedStateField } from "./types"
1212import { SectionHeader } from "./SectionHeader"
1313import { Section } from "./Section"
14+ import { SearchableSetting } from "./SearchableSetting"
1415import { AutoApproveToggle } from "./AutoApproveToggle"
1516import { MaxLimitInputs } from "./MaxLimitInputs"
1617import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -116,40 +117,45 @@ export const AutoApproveSettings = ({
116117
117118 < Section >
118119 < div className = "space-y-4" >
119- < VSCodeCheckbox
120- checked = { effectiveAutoApprovalEnabled }
121- aria-label = { t ( "settings:autoApprove.toggleAriaLabel" ) }
122- onChange = { ( ) => {
123- const newValue = ! ( autoApprovalEnabled ?? false )
124- setAutoApprovalEnabled ( newValue )
125- vscode . postMessage ( { type : "autoApprovalEnabled" , bool : newValue } )
126- } } >
127- < span className = "font-medium" > { t ( "settings:autoApprove.enabled" ) } </ span >
128- </ VSCodeCheckbox >
129- < div className = "text-vscode-descriptionForeground text-sm mt-1" >
130- < p > { t ( "settings:autoApprove.description" ) } </ p >
131- < p >
132- < Trans
133- i18nKey = "settings:autoApprove.toggleShortcut"
134- components = { {
135- SettingsLink : (
136- < a
137- href = "#"
138- className = "text-vscode-textLink-foreground hover:underline cursor-pointer"
139- onClick = { ( e ) => {
140- e . preventDefault ( )
141- // Send message to open keyboard shortcuts with search for toggle command
142- vscode . postMessage ( {
143- type : "openKeyboardShortcuts" ,
144- text : `${ Package . name } .toggleAutoApprove` ,
145- } )
146- } }
147- />
148- ) ,
149- } }
150- />
151- </ p >
152- </ div >
120+ < SearchableSetting
121+ settingId = "auto-approve-enabled"
122+ section = "autoApprove"
123+ label = { t ( "settings:autoApprove.enabled" ) } >
124+ < VSCodeCheckbox
125+ checked = { effectiveAutoApprovalEnabled }
126+ aria-label = { t ( "settings:autoApprove.toggleAriaLabel" ) }
127+ onChange = { ( ) => {
128+ const newValue = ! ( autoApprovalEnabled ?? false )
129+ setAutoApprovalEnabled ( newValue )
130+ vscode . postMessage ( { type : "autoApprovalEnabled" , bool : newValue } )
131+ } } >
132+ < span className = "font-medium" > { t ( "settings:autoApprove.enabled" ) } </ span >
133+ </ VSCodeCheckbox >
134+ < div className = "text-vscode-descriptionForeground text-sm mt-1" >
135+ < p > { t ( "settings:autoApprove.description" ) } </ p >
136+ < p >
137+ < Trans
138+ i18nKey = "settings:autoApprove.toggleShortcut"
139+ components = { {
140+ SettingsLink : (
141+ < a
142+ href = "#"
143+ className = "text-vscode-textLink-foreground hover:underline cursor-pointer"
144+ onClick = { ( e ) => {
145+ e . preventDefault ( )
146+ // Send message to open keyboard shortcuts with search for toggle command
147+ vscode . postMessage ( {
148+ type : "openKeyboardShortcuts" ,
149+ text : `${ Package . name } .toggleAutoApprove` ,
150+ } )
151+ } }
152+ />
153+ ) ,
154+ } }
155+ />
156+ </ p >
157+ </ div >
158+ </ SearchableSetting >
153159
154160 < AutoApproveToggle
155161 alwaysAllowReadOnly = { alwaysAllowReadOnly }
@@ -179,7 +185,10 @@ export const AutoApproveSettings = ({
179185 < span className = "codicon codicon-eye" />
180186 < div > { t ( "settings:autoApprove.readOnly.label" ) } </ div >
181187 </ div >
182- < div >
188+ < SearchableSetting
189+ settingId = "auto-approve-readonly-outside-workspace"
190+ section = "autoApprove"
191+ label = { t ( "settings:autoApprove.readOnly.outsideWorkspace.label" ) } >
183192 < VSCodeCheckbox
184193 checked = { alwaysAllowReadOnlyOutsideWorkspace }
185194 onChange = { ( e : any ) =>
@@ -193,7 +202,7 @@ export const AutoApproveSettings = ({
193202 < div className = "text-vscode-descriptionForeground text-sm mt-1" >
194203 { t ( "settings:autoApprove.readOnly.outsideWorkspace.description" ) }
195204 </ div >
196- </ div >
205+ </ SearchableSetting >
197206 </ div >
198207 ) }
199208
@@ -203,7 +212,10 @@ export const AutoApproveSettings = ({
203212 < span className = "codicon codicon-edit" />
204213 < div > { t ( "settings:autoApprove.write.label" ) } </ div >
205214 </ div >
206- < div >
215+ < SearchableSetting
216+ settingId = "auto-approve-write-outside-workspace"
217+ section = "autoApprove"
218+ label = { t ( "settings:autoApprove.write.outsideWorkspace.label" ) } >
207219 < VSCodeCheckbox
208220 checked = { alwaysAllowWriteOutsideWorkspace }
209221 onChange = { ( e : any ) =>
@@ -217,8 +229,11 @@ export const AutoApproveSettings = ({
217229 < div className = "text-vscode-descriptionForeground text-sm mt-1" >
218230 { t ( "settings:autoApprove.write.outsideWorkspace.description" ) }
219231 </ div >
220- </ div >
221- < div >
232+ </ SearchableSetting >
233+ < SearchableSetting
234+ settingId = "auto-approve-write-protected"
235+ section = "autoApprove"
236+ label = { t ( "settings:autoApprove.write.protected.label" ) } >
222237 < VSCodeCheckbox
223238 checked = { alwaysAllowWriteProtected }
224239 onChange = { ( e : any ) =>
@@ -230,7 +245,7 @@ export const AutoApproveSettings = ({
230245 < div className = "text-vscode-descriptionForeground text-sm mt-1 mb-3" >
231246 { t ( "settings:autoApprove.write.protected.description" ) }
232247 </ div >
233- </ div >
248+ </ SearchableSetting >
234249 </ div >
235250 ) }
236251
@@ -240,7 +255,10 @@ export const AutoApproveSettings = ({
240255 < span className = "codicon codicon-question" />
241256 < div > { t ( "settings:autoApprove.followupQuestions.label" ) } </ div >
242257 </ div >
243- < div >
258+ < SearchableSetting
259+ settingId = "auto-approve-followup-timeout"
260+ section = "autoApprove"
261+ label = { t ( "settings:autoApprove.followupQuestions.timeoutLabel" ) } >
244262 < div className = "flex items-center gap-2" >
245263 < Slider
246264 min = { 1000 }
@@ -257,7 +275,7 @@ export const AutoApproveSettings = ({
257275 < div className = "text-vscode-descriptionForeground text-sm mt-1" >
258276 { t ( "settings:autoApprove.followupQuestions.timeoutLabel" ) }
259277 </ div >
260- </ div >
278+ </ SearchableSetting >
261279 </ div >
262280 ) }
263281
@@ -268,14 +286,17 @@ export const AutoApproveSettings = ({
268286 < div > { t ( "settings:autoApprove.execute.label" ) } </ div >
269287 </ div >
270288
271- < div >
289+ < SearchableSetting
290+ settingId = "auto-approve-allowed-commands"
291+ section = "autoApprove"
292+ label = { t ( "settings:autoApprove.execute.allowedCommands" ) } >
272293 < label className = "block font-medium mb-1" data-testid = "allowed-commands-heading" >
273294 { t ( "settings:autoApprove.execute.allowedCommands" ) }
274295 </ label >
275296 < div className = "text-vscode-descriptionForeground text-sm mt-1" >
276297 { t ( "settings:autoApprove.execute.allowedCommandsDescription" ) }
277298 </ div >
278- </ div >
299+ </ SearchableSetting >
279300
280301 < div className = "flex gap-2" >
281302 < Input
@@ -320,14 +341,18 @@ export const AutoApproveSettings = ({
320341 </ div >
321342
322343 { /* Denied Commands Section */ }
323- < div className = "mt-6" >
344+ < SearchableSetting
345+ settingId = "auto-approve-denied-commands"
346+ section = "autoApprove"
347+ label = { t ( "settings:autoApprove.execute.deniedCommands" ) }
348+ className = "mt-6" >
324349 < label className = "block font-medium mb-1" data-testid = "denied-commands-heading" >
325350 { t ( "settings:autoApprove.execute.deniedCommands" ) }
326351 </ label >
327352 < div className = "text-vscode-descriptionForeground text-sm mt-1" >
328353 { t ( "settings:autoApprove.execute.deniedCommandsDescription" ) }
329354 </ div >
330- </ div >
355+ </ SearchableSetting >
331356
332357 < div className = "flex gap-2" >
333358 < Input
0 commit comments