@@ -27,6 +27,13 @@ export interface ActionMetadata {
2727}
2828
2929const ACTION_METADATA : ActionMetadata [ ] = [
30+ {
31+ id : "enableAll" ,
32+ label : "Enable all" ,
33+ shortName : "All" ,
34+ description : "Enable all actions." ,
35+ icon : "codicon-checklist" ,
36+ } ,
3037 {
3138 id : "readFiles" ,
3239 label : "Read project files" ,
@@ -87,22 +94,16 @@ const ACTION_METADATA: ActionMetadata[] = [
8794 description : "Allows Cline to use configured MCP servers which may modify filesystem or interact with APIs." ,
8895 icon : "codicon-server" ,
8996 } ,
90- {
91- id : "enableAll" ,
92- label : "Enable all" ,
93- shortName : "All" ,
94- description : "Enable all actions." ,
95- icon : "codicon-checklist" ,
96- } ,
97- {
98- id : "enableNotifications" ,
99- label : "Enable notifications" ,
100- shortName : "Notifications" ,
101- description : "Receive system notifications when Cline requires approval to proceed or when a task is completed." ,
102- icon : "codicon-bell" ,
103- } ,
10497]
10598
99+ const NOTIFICATIONS_SETTING : ActionMetadata = {
100+ id : "enableNotifications" ,
101+ label : "Enable notifications" ,
102+ shortName : "Notifications" ,
103+ description : "Receive system notifications when Cline requires approval to proceed or when a task is completed." ,
104+ icon : "codicon-bell" ,
105+ }
106+
106107const AutoApproveMenu = ( { style } : AutoApproveMenuProps ) => {
107108 const { autoApprovalSettings } = useExtensionState ( )
108109 const [ isExpanded , setIsExpanded ] = useState ( false )
@@ -265,8 +266,8 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
265266
266267 // Render a favorited item with a checkbox
267268 const renderFavoritedItem = ( favId : string ) => {
268- // Regular action item
269- const action = ACTION_METADATA . flatMap ( ( a ) => [ a , a . subAction ] ) . find ( ( a ) => a ?. id === favId )
269+ const actions = [ ... ACTION_METADATA . flatMap ( ( a ) => [ a , a . subAction ] ) , NOTIFICATIONS_SETTING ]
270+ const action = actions . find ( ( a ) => a ?. id === favId )
270271 if ( ! action ) return null
271272
272273 return (
@@ -380,18 +381,15 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
380381 placement = "top" >
381382 < span style = { { color : getAsVar ( VSC_FOREGROUND ) } } > Auto-approve</ span >
382383 </ HeroTooltip >
383- < span className = "codicon codicon-chevron-down" />
384+ < span className = "codicon codicon-chevron-down" style = { { paddingRight : "4px" } } />
384385 </ div >
385386
386387 < div
387388 ref = { itemsContainerRef }
388389 style = { {
389- display : containerWidth > breakpoint ? "grid" : "flex" ,
390- gridTemplateColumns : containerWidth > breakpoint ? "1fr 1fr" : "1fr" ,
391- gridAutoRows : "min-content" ,
392- flexDirection : "column" ,
393- gap : "4px" ,
394- margin : "8px 0" ,
390+ columnCount : containerWidth > breakpoint ? 2 : 1 ,
391+ columnGap : "4px" ,
392+ margin : "4px 0 8px 0" ,
395393 position : "relative" , // For absolute positioning of the separator
396394 } } >
397395 { /* Vertical separator line - only visible in two-column mode */ }
@@ -412,35 +410,42 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
412410
413411 { /* All items in a single list - CSS Grid will handle the column distribution */ }
414412 { ACTION_METADATA . map ( ( action ) => (
415- < div key = { action . id } style = { { breakInside : "avoid" } } >
416- < AutoApproveMenuItem
417- action = { action }
418- isChecked = { isChecked }
419- isFavorited = { isFavorited }
420- onToggle = { updateAction }
421- onToggleFavorite = { toggleFavorite }
422- />
423- </ div >
413+ < AutoApproveMenuItem
414+ key = { action . id }
415+ action = { action }
416+ isChecked = { isChecked }
417+ isFavorited = { isFavorited }
418+ onToggle = { updateAction }
419+ onToggleFavorite = { toggleFavorite }
420+ />
424421 ) ) }
425422 </ div >
426423 < div
427424 style = { {
428425 height : "0.5px" ,
429426 background : getAsVar ( VSC_TITLEBAR_INACTIVE_FOREGROUND ) ,
430- margin : "10px 0" ,
427+ margin : "8px 0" ,
431428 opacity : 0.2 ,
432429 } }
433430 />
431+ < AutoApproveMenuItem
432+ key = { NOTIFICATIONS_SETTING . id }
433+ action = { NOTIFICATIONS_SETTING }
434+ isChecked = { isChecked }
435+ isFavorited = { isFavorited }
436+ onToggle = { updateAction }
437+ onToggleFavorite = { toggleFavorite }
438+ />
434439 < HeroTooltip
435440 content = "Cline will automatically make this many API requests before asking for approval to proceed with the task."
436441 placement = "top" >
437442 < div
438443 style = { {
444+ margin : "2px 10px 10px 5px" ,
439445 display : "flex" ,
440446 alignItems : "center" ,
441447 gap : "8px" ,
442448 width : "100%" ,
443- paddingBottom : "10px" ,
444449 } } >
445450 < span className = "codicon codicon-settings" style = { { color : "#CCCCCC" , fontSize : "14px" } } />
446451 < span style = { { color : "#CCCCCC" , fontSize : "12px" , fontWeight : 500 } } > Max Requests:</ span >
0 commit comments