feat: refine onboarding hatch flow

This commit is contained in:
Peter Steinberger
2026-01-23 04:32:13 +00:00
parent 64be2b2cd1
commit 5d0d9e6323
4 changed files with 105 additions and 16 deletions

View File

@@ -217,6 +217,19 @@ export async function openUrl(url: string): Promise<boolean> {
}
}
export async function openUrlInBackground(url: string): Promise<boolean> {
if (process.platform !== "darwin") return false;
const resolved = await resolveBrowserOpenCommand();
if (!resolved.argv || resolved.command !== "open") return false;
const command = ["open", "-g", url];
try {
await runCommandWithTimeout(command, { timeoutMs: 5_000 });
return true;
} catch {
return false;
}
}
export async function ensureWorkspaceAndSessions(
workspaceDir: string,
runtime: RuntimeEnv,