| ... | ... | @@ -306,21 +306,20 @@ const probeCodexCapabilities = (input: { |
| 306 | 306 | }), |
| 307 | 307 | ); |
| 308 | 308 | |
| 309 | | const runCodexCommand = (args: ReadonlyArray<string>) => |
| 310 | | Effect.gen(function* () { |
| 311 | | const settingsService = yield* ServerSettingsService; |
| 312 | | const codexSettings = yield* settingsService.getSettings.pipe( |
| 313 | | Effect.map((settings) => settings.providers.codex), |
| 314 | | ); |
| 315 | | const command = ChildProcess.make(codexSettings.binaryPath, [...args], { |
| 316 | | shell: process.platform === "win32", |
| 317 | | env: { |
| 318 | | ...process.env, |
| 319 | | ...(codexSettings.homePath ? { CODEX_HOME: codexSettings.homePath } : {}), |
| 320 | | }, |
| 321 | | }); |
| 322 | | return yield* spawnAndCollect(codexSettings.binaryPath, command); |
| 309 | const runCodexCommand = Effect.fn("runCodexCommand")(function* (args: ReadonlyArray<string>) { |
| 310 | const settingsService = yield* ServerSettingsService; |
| 311 | const codexSettings = yield* settingsService.getSettings.pipe( |
| 312 | Effect.map((settings) => settings.providers.codex), |
| 313 | ); |
| 314 | const command = ChildProcess.make(codexSettings.binaryPath, [...args], { |
| 315 | shell: process.platform === "win32", |
| 316 | env: { |
| 317 | ...process.env, |
| 318 | ...(codexSettings.homePath ? { CODEX_HOME: codexSettings.homePath } : {}), |
| 319 | }, |
| 323 | 320 | }); |
| 321 | return yield* spawnAndCollect(codexSettings.binaryPath, command); |
| 322 | }); |
| 324 | 323 | |
| 325 | 324 | export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(function* ( |
| 326 | 325 | resolveAccount?: (input: { |