diff --git a/src/apps/desktop/src/api/computer_use_api.rs b/src/apps/desktop/src/api/computer_use_api.rs index ae84c17..4e16977 100644 --- a/src/apps/desktop/src/api/computer_use_api.rs +++ b/src/apps/desktop/src/api/computer_use_api.rs @@ -82,8 +82,16 @@ pub async fn computer_use_open_system_settings( } #[cfg(target_os = "windows")] { - let _ = request; - Err("Open system settings is not wired for Windows yet.".to_string()) + let url = match request.pane.as_str() { + "accessibility" => "ms-settings:easeofaccess-highcontrast", + "screen_capture" => "ms-settings:privacy-webcam", // Screen capture not directly available, open privacy page + _ => return Err(format!("Unknown settings pane: {}", request.pane)), + }; + std::process::Command::new("cmd") + .args(["/C", "start", "", url]) + .spawn() + .map_err(|e| e.to_string())?; + Ok(()) } #[cfg(target_os = "linux")] { diff --git a/src/apps/desktop/src/theme.rs b/src/apps/desktop/src/theme.rs index 2c7d187..f74e7e7 100644 --- a/src/apps/desktop/src/theme.rs +++ b/src/apps/desktop/src/theme.rs @@ -239,7 +239,7 @@ pub fn create_main_window(app_handle: &tauri::AppHandle) { let init_script = theme.generate_init_script(); let main_url = if cfg!(debug_assertions) { - match "http://localhost:1422".parse() { + match "http://localhost:5722".parse() { Ok(url) => WebviewUrl::External(url), Err(e) => { error!("Invalid dev URL, fallback to app URL: {}", e); diff --git a/src/apps/desktop/tauri.conf.json b/src/apps/desktop/tauri.conf.json index b0a83f2..0e5d392 100644 --- a/src/apps/desktop/tauri.conf.json +++ b/src/apps/desktop/tauri.conf.json @@ -4,7 +4,7 @@ "identifier": "com.sparo-os.desktop", "build": { "beforeDevCommand": "pnpm run dev:web", - "devUrl": "http://localhost:1422", + "devUrl": "http://localhost:5722", "beforeBuildCommand": "pnpm run build:web && pnpm run prepare:mobile-web", "frontendDist": "../../../dist" }, diff --git a/src/web-ui/src/infrastructure/config/components/PermissionsConfig.tsx b/src/web-ui/src/infrastructure/config/components/PermissionsConfig.tsx index ddae656..d252e32 100644 --- a/src/web-ui/src/infrastructure/config/components/PermissionsConfig.tsx +++ b/src/web-ui/src/infrastructure/config/components/PermissionsConfig.tsx @@ -37,7 +37,6 @@ const PermissionsConfig: React.FC = () => { handleSkipToolConfirmationChange, handleComputerUseEnabledChange, handleComputerUseOpenSettings, - refreshComputerUseStatus, refreshBrowserControlStatus, handleBrowserControlLaunch, handleBrowserControlRestart, @@ -146,21 +145,8 @@ const PermissionsConfig: React.FC = () => { className="bitfun-func-agent-config__row-control" style={{ display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', alignItems: 'center', justifyContent: 'flex-end', gap: 8 }} > - - - {computerUseAccess ? t('computerUse.granted') : t('computerUse.notGranted')} - - void refreshComputerUseStatus()} - > - - + + {computerUseAccess ? t('computerUse.granted') : t('computerUse.notGranted')}