From 71795d5487302ca0b9894c58db946b273cee0c03 Mon Sep 17 00:00:00 2001 From: Afshawn Lotfi Date: Mon, 10 Mar 2025 06:51:35 +0000 Subject: [PATCH] Enhance BrowserSettings component with VSCodeTextField for remote browser URL input --- .../components/settings/BrowserSettings.tsx | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/webview-ui/src/components/settings/BrowserSettings.tsx b/webview-ui/src/components/settings/BrowserSettings.tsx index 5c20a632c6..5c385a3d8d 100644 --- a/webview-ui/src/components/settings/BrowserSettings.tsx +++ b/webview-ui/src/components/settings/BrowserSettings.tsx @@ -1,5 +1,5 @@ import React, { HTMLAttributes, useState, useEffect } from "react" -import { VSCodeButton, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react" +import { VSCodeButton, VSCodeCheckbox, VSCodeTextField } from "@vscode/webview-ui-toolkit/react" import { Dropdown, type DropdownOption } from "vscrui" import { SquareMousePointer } from "lucide-react" @@ -192,28 +192,19 @@ export const BrowserSettings = ({ {remoteBrowserEnabled && ( <> -
- + + onChange={(e: any) => setCachedStateField( "remoteBrowserHost", e.target.value || undefined, ) } + placeholder="Custom URL (e.g., http://localhost:9222)" + style={{ flexGrow: 1 }} /> {testingConnection || discovering ? "Testing..." : "Test Connection"} @@ -221,7 +212,7 @@ export const BrowserSettings = ({
{testResult && (
)} -

- Enter the DevTools Protocol host address or leave empty to auto-discover - Chrome instances on your network. The Test Connection button will try the - custom URL if provided, or auto-discover if the field is empty. +

+ Enter the DevTools Protocol host address or + leave empty to auto-discover Chrome local instances. + The Test Connection button will try the custom URL if provided, or + auto-discover if the field is empty.

)}