- Move BranchToolbar below the chat input box to match Codex app layout
- Change worktree path to ~/.t3code/worktrees/{repo}/{branch}
- Split desktop tsdown config into separate main/preload builds to prevent
code-splitting from leaking node:os into the sandboxed preload script
- Migrate turbo scripts to turbo watch, add desktop start/smoke-test tasks
- Update server output to .mjs, add CJS format, remove tsx dependency
Co-Authored-By: Claude Opus 4.6 <[email protected]>
29 lines
659 B
JavaScript
29 lines
659 B
JavaScript
import { spawn } from "node:child_process";
|
|
|
|
import waitOn from "wait-on";
|
|
|
|
const port = Number(process.env.ELECTRON_RENDERER_PORT ?? 5173);
|
|
const devServerUrl = `http://localhost:${port}`;
|
|
|
|
await waitOn({
|
|
resources: [
|
|
`tcp:${port}`,
|
|
"file:dist-electron/main.js",
|
|
"file:dist-electron/preload.js",
|
|
// "file:../server/dist/index.cjs",
|
|
],
|
|
});
|
|
|
|
const command = process.platform === "win32" ? "electronmon.cmd" : "electronmon";
|
|
const child = spawn(command, ["dist-electron/main.js"], {
|
|
stdio: "inherit",
|
|
env: {
|
|
...process.env,
|
|
VITE_DEV_SERVER_URL: devServerUrl,
|
|
},
|
|
});
|
|
|
|
child.on("exit", (code) => {
|
|
process.exit(code ?? 0);
|
|
});
|