mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:20:43 +00:00
refactor: remove unused background browser open
This commit is contained in:
@@ -116,26 +116,3 @@ export async function openUrl(url: string): Promise<boolean> {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export async function openUrlInBackground(url: string): Promise<boolean> {
|
||||
if (shouldSkipBrowserOpenInTests()) {
|
||||
return false;
|
||||
}
|
||||
const normalizedUrl = normalizeBrowserOpenUrl(url);
|
||||
if (!normalizedUrl) {
|
||||
return false;
|
||||
}
|
||||
if (process.platform !== "darwin") {
|
||||
return false;
|
||||
}
|
||||
const resolved = await resolveBrowserOpenCommand();
|
||||
if (!resolved.argv || resolved.command !== "open") {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
await runCommandWithTimeout(["open", "-g", normalizedUrl], { timeoutMs: 5_000 });
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user