Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/apps/desktop/src/api/computer_use_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
{
Expand Down
2 changes: 1 addition & 1 deletion src/apps/desktop/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/apps/desktop/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const PermissionsConfig: React.FC = () => {
handleSkipToolConfirmationChange,
handleComputerUseEnabledChange,
handleComputerUseOpenSettings,
refreshComputerUseStatus,
refreshBrowserControlStatus,
handleBrowserControlLaunch,
handleBrowserControlRestart,
Expand Down Expand Up @@ -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 }}
>
<span style={{ display: 'inline-flex', alignItems: 'center', gap: 6, flexShrink: 0 }}>
<span className={computerUseAccess ? 'bitfun-func-agent-config__perm-status--granted' : undefined}>
{computerUseAccess ? t('computerUse.granted') : t('computerUse.notGranted')}
</span>
<IconButton
type="button"
size="small"
variant="ghost"
aria-label={t('computerUse.refreshStatus')}
tooltip={t('computerUse.refreshStatus')}
disabled={computerUseBusy}
onClick={() => void refreshComputerUseStatus()}
>
<RefreshCw size={14} />
</IconButton>
<span className={computerUseAccess ? 'bitfun-func-agent-config__perm-status--granted' : undefined}>
{computerUseAccess ? t('computerUse.granted') : t('computerUse.notGranted')}
</span>
<Button
className="bitfun-func-agent-config__row-action-btn"
Expand All @@ -183,21 +169,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 }}
>
<span style={{ display: 'inline-flex', alignItems: 'center', gap: 6, flexShrink: 0 }}>
<span className={computerUseScreen ? 'bitfun-func-agent-config__perm-status--granted' : undefined}>
{computerUseScreen ? t('computerUse.granted') : t('computerUse.notGranted')}
</span>
<IconButton
type="button"
size="small"
variant="ghost"
aria-label={t('computerUse.refreshStatus')}
tooltip={t('computerUse.refreshStatus')}
disabled={computerUseBusy}
onClick={() => void refreshComputerUseStatus()}
>
<RefreshCw size={14} />
</IconButton>
<span className={computerUseScreen ? 'bitfun-func-agent-config__perm-status--granted' : undefined}>
{computerUseScreen ? t('computerUse.granted') : t('computerUse.notGranted')}
</span>
<Button
className="bitfun-func-agent-config__row-action-btn"
Expand Down
6 changes: 3 additions & 3 deletions src/web-ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ export default defineConfig(({ mode, command }) => {
clearScreen: false,
// 2. tauri expects a fixed port, fail if that port is not available
server: {
port: 1422,
// Tauri devUrl is fixed to http://localhost:1422.
port: 5722,
// Tauri devUrl is fixed to http://localhost:5722.
// If Vite silently falls back to another port, the desktop webview stays blank.
strictPort: true,
host: host || "localhost",
hmr: {
protocol: "ws",
host: host || "localhost",
port: 1421,
port: 5721,
},
// Allow access to workspace root for dependencies like monaco-editor
fs: {
Expand Down
Loading