INNER CODE UNIT · TypeScript
desktopStart
lidge-jun/opencodex · src/cli/index.ts:840
const desktopStart = await runDesktopColdStart(productionDesktopColdStartDeps(timeoutMs => waitForProxy(timeoutMs)));
if (desktopStart.kind === "failed") { console.error(`❌ ${desktopStart.message}`); process.exitCode = 1; return false; }
// Also for restart: the proxy was absent and Desktop started it, so the live tail below applies.
if (desktopStart.kind === "live") live = desktopStart.live;
}
if (live) {
if (options.existingIsSuccess === false && live === owner.live) {
console.error("Proxy appeared while restart was confirming absence; no start was attempted.");
return false;
}
const synced = await syncModelsToCodex(live.port).catch(e => {
console.error(`⚠️ Model sync skipped: ${e instanceof Error ? e.message : String(e)}`);
return null;
});
if (synced?.status === "skipped") {
console.log(startupLeftCodexNativeLine(synced.skippedReason ?? "desired_disabled"));
}
// Do not refresh Raycast from saved config here: live bind/admission and