|
|
@@ -51,6 +51,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
|
|
|
alwaysAllowModeSwitch,
|
|
|
alwaysAllowWrite,
|
|
|
alwaysApproveResubmit,
|
|
|
+ browserToolEnabled,
|
|
|
browserViewportSize,
|
|
|
enableCheckpoints,
|
|
|
diffEnabled,
|
|
|
@@ -140,6 +141,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
|
|
|
vscode.postMessage({ type: "alwaysAllowBrowser", bool: alwaysAllowBrowser })
|
|
|
vscode.postMessage({ type: "alwaysAllowMcp", bool: alwaysAllowMcp })
|
|
|
vscode.postMessage({ type: "allowedCommands", commands: allowedCommands ?? [] })
|
|
|
+ vscode.postMessage({ type: "browserToolEnabled", bool: browserToolEnabled })
|
|
|
vscode.postMessage({ type: "soundEnabled", bool: soundEnabled })
|
|
|
vscode.postMessage({ type: "soundVolume", value: soundVolume })
|
|
|
vscode.postMessage({ type: "diffEnabled", bool: diffEnabled })
|
|
|
@@ -537,59 +539,83 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
|
|
|
<div style={{ marginBottom: 40 }}>
|
|
|
<h3 style={{ color: "var(--vscode-foreground)", margin: "0 0 15px 0" }}>Browser Settings</h3>
|
|
|
<div style={{ marginBottom: 15 }}>
|
|
|
- <label style={{ fontWeight: "500", display: "block", marginBottom: 5 }}>Viewport size</label>
|
|
|
- <div className="dropdown-container">
|
|
|
- <Dropdown
|
|
|
- value={browserViewportSize}
|
|
|
- onChange={(value: unknown) => {
|
|
|
- setCachedStateField("browserViewportSize", (value as DropdownOption).value)
|
|
|
- }}
|
|
|
- style={{ width: "100%" }}
|
|
|
- options={[
|
|
|
- { value: "1280x800", label: "Large Desktop (1280x800)" },
|
|
|
- { value: "900x600", label: "Small Desktop (900x600)" },
|
|
|
- { value: "768x1024", label: "Tablet (768x1024)" },
|
|
|
- { value: "360x640", label: "Mobile (360x640)" },
|
|
|
- ]}
|
|
|
- />
|
|
|
- </div>
|
|
|
- <p
|
|
|
- style={{
|
|
|
- fontSize: "12px",
|
|
|
- marginTop: "5px",
|
|
|
- color: "var(--vscode-descriptionForeground)",
|
|
|
- }}>
|
|
|
- Select the viewport size for browser interactions. This affects how websites are displayed
|
|
|
- and interacted with.
|
|
|
+ <VSCodeCheckbox
|
|
|
+ checked={browserToolEnabled}
|
|
|
+ onChange={(e: any) => setCachedStateField("browserToolEnabled", e.target.checked)}>
|
|
|
+ <span style={{ fontWeight: "500" }}>Enable browser tool</span>
|
|
|
+ </VSCodeCheckbox>
|
|
|
+ <p style={{ fontSize: "12px", marginTop: "5px", color: "var(--vscode-descriptionForeground)" }}>
|
|
|
+ When enabled, Roo can use a browser to interact with websites when using models that support
|
|
|
+ computer use.
|
|
|
</p>
|
|
|
</div>
|
|
|
+ {browserToolEnabled && (
|
|
|
+ <div
|
|
|
+ style={{
|
|
|
+ marginLeft: 0,
|
|
|
+ paddingLeft: 10,
|
|
|
+ borderLeft: "2px solid var(--vscode-button-background)",
|
|
|
+ }}>
|
|
|
+ <div style={{ marginBottom: 15 }}>
|
|
|
+ <label style={{ fontWeight: "500", display: "block", marginBottom: 5 }}>
|
|
|
+ Viewport size
|
|
|
+ </label>
|
|
|
+ <div className="dropdown-container">
|
|
|
+ <Dropdown
|
|
|
+ value={browserViewportSize}
|
|
|
+ onChange={(value: unknown) => {
|
|
|
+ setCachedStateField("browserViewportSize", (value as DropdownOption).value)
|
|
|
+ }}
|
|
|
+ style={{ width: "100%" }}
|
|
|
+ options={[
|
|
|
+ { value: "1280x800", label: "Large Desktop (1280x800)" },
|
|
|
+ { value: "900x600", label: "Small Desktop (900x600)" },
|
|
|
+ { value: "768x1024", label: "Tablet (768x1024)" },
|
|
|
+ { value: "360x640", label: "Mobile (360x640)" },
|
|
|
+ ]}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <p
|
|
|
+ style={{
|
|
|
+ fontSize: "12px",
|
|
|
+ marginTop: "5px",
|
|
|
+ color: "var(--vscode-descriptionForeground)",
|
|
|
+ }}>
|
|
|
+ Select the viewport size for browser interactions. This affects how websites are
|
|
|
+ displayed and interacted with.
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
|
|
|
- <div style={{ marginBottom: 15 }}>
|
|
|
- <div style={{ display: "flex", flexDirection: "column", gap: "5px" }}>
|
|
|
- <span style={{ fontWeight: "500" }}>Screenshot quality</span>
|
|
|
- <div style={{ display: "flex", alignItems: "center", gap: "5px" }}>
|
|
|
- <input
|
|
|
- type="range"
|
|
|
- min="1"
|
|
|
- max="100"
|
|
|
- step="1"
|
|
|
- value={screenshotQuality ?? 75}
|
|
|
- className="h-2 focus:outline-0 w-4/5 accent-vscode-button-background"
|
|
|
- onChange={(e) => setCachedStateField("screenshotQuality", parseInt(e.target.value))}
|
|
|
- />
|
|
|
- <span style={{ ...sliderLabelStyle }}>{screenshotQuality ?? 75}%</span>
|
|
|
+ <div style={{ marginBottom: 15 }}>
|
|
|
+ <div style={{ display: "flex", flexDirection: "column", gap: "5px" }}>
|
|
|
+ <span style={{ fontWeight: "500" }}>Screenshot quality</span>
|
|
|
+ <div style={{ display: "flex", alignItems: "center", gap: "5px" }}>
|
|
|
+ <input
|
|
|
+ type="range"
|
|
|
+ min="1"
|
|
|
+ max="100"
|
|
|
+ step="1"
|
|
|
+ value={screenshotQuality ?? 75}
|
|
|
+ className="h-2 focus:outline-0 w-4/5 accent-vscode-button-background"
|
|
|
+ onChange={(e) =>
|
|
|
+ setCachedStateField("screenshotQuality", parseInt(e.target.value))
|
|
|
+ }
|
|
|
+ />
|
|
|
+ <span style={{ ...sliderLabelStyle }}>{screenshotQuality ?? 75}%</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <p
|
|
|
+ style={{
|
|
|
+ fontSize: "12px",
|
|
|
+ marginTop: "5px",
|
|
|
+ color: "var(--vscode-descriptionForeground)",
|
|
|
+ }}>
|
|
|
+ Adjust the WebP quality of browser screenshots. Higher values provide clearer
|
|
|
+ screenshots but increase token usage.
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <p
|
|
|
- style={{
|
|
|
- fontSize: "12px",
|
|
|
- marginTop: "5px",
|
|
|
- color: "var(--vscode-descriptionForeground)",
|
|
|
- }}>
|
|
|
- Adjust the WebP quality of browser screenshots. Higher values provide clearer screenshots
|
|
|
- but increase token usage.
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ )}
|
|
|
</div>
|
|
|
|
|
|
<div style={{ marginBottom: 40 }}>
|