@@ -51,6 +51,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
5151 alwaysAllowModeSwitch,
5252 alwaysAllowWrite,
5353 alwaysApproveResubmit,
54+ browserToolEnabled,
5455 browserViewportSize,
5556 enableCheckpoints,
5657 diffEnabled,
@@ -140,6 +141,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
140141 vscode . postMessage ( { type : "alwaysAllowBrowser" , bool : alwaysAllowBrowser } )
141142 vscode . postMessage ( { type : "alwaysAllowMcp" , bool : alwaysAllowMcp } )
142143 vscode . postMessage ( { type : "allowedCommands" , commands : allowedCommands ?? [ ] } )
144+ vscode . postMessage ( { type : "browserToolEnabled" , bool : browserToolEnabled } )
143145 vscode . postMessage ( { type : "soundEnabled" , bool : soundEnabled } )
144146 vscode . postMessage ( { type : "soundVolume" , value : soundVolume } )
145147 vscode . postMessage ( { type : "diffEnabled" , bool : diffEnabled } )
@@ -537,59 +539,83 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
537539 < div style = { { marginBottom : 40 } } >
538540 < h3 style = { { color : "var(--vscode-foreground)" , margin : "0 0 15px 0" } } > Browser Settings</ h3 >
539541 < div style = { { marginBottom : 15 } } >
540- < label style = { { fontWeight : "500" , display : "block" , marginBottom : 5 } } > Viewport size</ label >
541- < div className = "dropdown-container" >
542- < Dropdown
543- value = { browserViewportSize }
544- onChange = { ( value : unknown ) => {
545- setCachedStateField ( "browserViewportSize" , ( value as DropdownOption ) . value )
546- } }
547- style = { { width : "100%" } }
548- options = { [
549- { value : "1280x800" , label : "Large Desktop (1280x800)" } ,
550- { value : "900x600" , label : "Small Desktop (900x600)" } ,
551- { value : "768x1024" , label : "Tablet (768x1024)" } ,
552- { value : "360x640" , label : "Mobile (360x640)" } ,
553- ] }
554- />
555- </ div >
556- < p
557- style = { {
558- fontSize : "12px" ,
559- marginTop : "5px" ,
560- color : "var(--vscode-descriptionForeground)" ,
561- } } >
562- Select the viewport size for browser interactions. This affects how websites are displayed
563- and interacted with.
542+ < VSCodeCheckbox
543+ checked = { browserToolEnabled }
544+ onChange = { ( e : any ) => setCachedStateField ( "browserToolEnabled" , e . target . checked ) } >
545+ < span style = { { fontWeight : "500" } } > Enable browser tool</ span >
546+ </ VSCodeCheckbox >
547+ < p style = { { fontSize : "12px" , marginTop : "5px" , color : "var(--vscode-descriptionForeground)" } } >
548+ When enabled, Roo can use a browser to interact with websites when using models that support
549+ computer use.
564550 </ p >
565551 </ div >
552+ { browserToolEnabled && (
553+ < div
554+ style = { {
555+ marginLeft : 0 ,
556+ paddingLeft : 10 ,
557+ borderLeft : "2px solid var(--vscode-button-background)" ,
558+ } } >
559+ < div style = { { marginBottom : 15 } } >
560+ < label style = { { fontWeight : "500" , display : "block" , marginBottom : 5 } } >
561+ Viewport size
562+ </ label >
563+ < div className = "dropdown-container" >
564+ < Dropdown
565+ value = { browserViewportSize }
566+ onChange = { ( value : unknown ) => {
567+ setCachedStateField ( "browserViewportSize" , ( value as DropdownOption ) . value )
568+ } }
569+ style = { { width : "100%" } }
570+ options = { [
571+ { value : "1280x800" , label : "Large Desktop (1280x800)" } ,
572+ { value : "900x600" , label : "Small Desktop (900x600)" } ,
573+ { value : "768x1024" , label : "Tablet (768x1024)" } ,
574+ { value : "360x640" , label : "Mobile (360x640)" } ,
575+ ] }
576+ />
577+ </ div >
578+ < p
579+ style = { {
580+ fontSize : "12px" ,
581+ marginTop : "5px" ,
582+ color : "var(--vscode-descriptionForeground)" ,
583+ } } >
584+ Select the viewport size for browser interactions. This affects how websites are
585+ displayed and interacted with.
586+ </ p >
587+ </ div >
566588
567- < div style = { { marginBottom : 15 } } >
568- < div style = { { display : "flex" , flexDirection : "column" , gap : "5px" } } >
569- < span style = { { fontWeight : "500" } } > Screenshot quality</ span >
570- < div style = { { display : "flex" , alignItems : "center" , gap : "5px" } } >
571- < input
572- type = "range"
573- min = "1"
574- max = "100"
575- step = "1"
576- value = { screenshotQuality ?? 75 }
577- className = "h-2 focus:outline-0 w-4/5 accent-vscode-button-background"
578- onChange = { ( e ) => setCachedStateField ( "screenshotQuality" , parseInt ( e . target . value ) ) }
579- />
580- < span style = { { ...sliderLabelStyle } } > { screenshotQuality ?? 75 } %</ span >
589+ < div style = { { marginBottom : 15 } } >
590+ < div style = { { display : "flex" , flexDirection : "column" , gap : "5px" } } >
591+ < span style = { { fontWeight : "500" } } > Screenshot quality</ span >
592+ < div style = { { display : "flex" , alignItems : "center" , gap : "5px" } } >
593+ < input
594+ type = "range"
595+ min = "1"
596+ max = "100"
597+ step = "1"
598+ value = { screenshotQuality ?? 75 }
599+ className = "h-2 focus:outline-0 w-4/5 accent-vscode-button-background"
600+ onChange = { ( e ) =>
601+ setCachedStateField ( "screenshotQuality" , parseInt ( e . target . value ) )
602+ }
603+ />
604+ < span style = { { ...sliderLabelStyle } } > { screenshotQuality ?? 75 } %</ span >
605+ </ div >
606+ </ div >
607+ < p
608+ style = { {
609+ fontSize : "12px" ,
610+ marginTop : "5px" ,
611+ color : "var(--vscode-descriptionForeground)" ,
612+ } } >
613+ Adjust the WebP quality of browser screenshots. Higher values provide clearer
614+ screenshots but increase token usage.
615+ </ p >
581616 </ div >
582617 </ div >
583- < p
584- style = { {
585- fontSize : "12px" ,
586- marginTop : "5px" ,
587- color : "var(--vscode-descriptionForeground)" ,
588- } } >
589- Adjust the WebP quality of browser screenshots. Higher values provide clearer screenshots
590- but increase token usage.
591- </ p >
592- </ div >
618+ ) }
593619 </ div >
594620
595621 < div style = { { marginBottom : 40 } } >
0 commit comments