(projectPath: string)
| 96 | } |
| 97 | |
| 98 | function readTrunkBranch(projectPath: string): string { |
| 99 | const result = Bun.spawnSync(["git", "rev-parse", "--abbrev-ref", "HEAD"], { |
| 100 | cwd: projectPath, |
| 101 | stdout: "pipe", |
| 102 | stderr: "pipe", |
| 103 | }); |
| 104 | if (result.exitCode !== 0) { |
| 105 | throw new Error(`Failed to detect trunk branch: ${result.stderr.toString()}`); |
| 106 | } |
| 107 | return result.stdout.toString().trim(); |
| 108 | } |
| 109 | |
| 110 | async function createWorkspaceViaOrpc(args: { |
| 111 | page: Page; |