Backup before continuing from Codex 5.2 session - User storage, compaction suggestions, streaming improvements
This commit is contained in:
@@ -79,6 +79,11 @@ export class CliProcessManager extends EventEmitter {
|
||||
private status: CliStatus = { state: "stopped" }
|
||||
private stdoutBuffer = ""
|
||||
private stderrBuffer = ""
|
||||
private userEnv: Record<string, string> = {}
|
||||
|
||||
setUserEnv(env: Record<string, string>) {
|
||||
this.userEnv = { ...env }
|
||||
}
|
||||
|
||||
async start(options: StartOptions): Promise<CliStatus> {
|
||||
if (this.child) {
|
||||
@@ -100,6 +105,7 @@ export class CliProcessManager extends EventEmitter {
|
||||
|
||||
const env = supportsUserShell() ? getUserShellEnv() : { ...process.env }
|
||||
env.ELECTRON_RUN_AS_NODE = "1"
|
||||
Object.assign(env, this.userEnv)
|
||||
|
||||
const spawnDetails = supportsUserShell()
|
||||
? buildUserShellCommand(`ELECTRON_RUN_AS_NODE=1 exec ${this.buildCommand(cliEntry, args)}`)
|
||||
@@ -274,7 +280,8 @@ export class CliProcessManager extends EventEmitter {
|
||||
const args = ["serve", "--host", host, "--port", "0"]
|
||||
|
||||
if (options.dev) {
|
||||
args.push("--ui-dev-server", "http://localhost:3000", "--log-level", "debug")
|
||||
const uiPort = process.env.VITE_PORT || "3000"
|
||||
args.push("--ui-dev-server", `http://localhost:${uiPort}`, "--log-level", "debug")
|
||||
}
|
||||
|
||||
return args
|
||||
|
||||
Reference in New Issue
Block a user