Closes #5045, /new should not persist if original session was ephemeral
This commit is contained in:
@@ -232,7 +232,9 @@ export class AgentSessionRuntime {
|
|||||||
|
|
||||||
const previousSessionFile = this.session.sessionFile;
|
const previousSessionFile = this.session.sessionFile;
|
||||||
const sessionDir = this.session.sessionManager.getSessionDir();
|
const sessionDir = this.session.sessionManager.getSessionDir();
|
||||||
const sessionManager = SessionManager.create(this.cwd, sessionDir);
|
const sessionManager = this.session.sessionManager.isPersisted()
|
||||||
|
? SessionManager.create(this.cwd, sessionDir)
|
||||||
|
: SessionManager.inMemory(this.cwd);
|
||||||
if (options?.parentSession) {
|
if (options?.parentSession) {
|
||||||
sessionManager.newSession({ parentSession: options.parentSession });
|
sessionManager.newSession({ parentSession: options.parentSession });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user