mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 19:02:10 +00:00
parent
638fbc459b
commit
234f367d0d
1 changed files with 4 additions and 2 deletions
|
|
@ -658,7 +658,9 @@ export class SessionManager {
|
||||||
this._buildIndex();
|
this._buildIndex();
|
||||||
this.flushed = true;
|
this.flushed = true;
|
||||||
} else {
|
} else {
|
||||||
|
const explicitPath = this.sessionFile;
|
||||||
this.newSession();
|
this.newSession();
|
||||||
|
this.sessionFile = explicitPath; // preserve explicit path from --session flag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -675,11 +677,11 @@ export class SessionManager {
|
||||||
};
|
};
|
||||||
this.fileEntries = [header];
|
this.fileEntries = [header];
|
||||||
this.byId.clear();
|
this.byId.clear();
|
||||||
|
this.labelsById.clear();
|
||||||
this.leafId = null;
|
this.leafId = null;
|
||||||
this.flushed = false;
|
this.flushed = false;
|
||||||
|
|
||||||
// Only generate filename if persisting and not already set (e.g., via --session flag)
|
if (this.persist) {
|
||||||
if (this.persist && !this.sessionFile) {
|
|
||||||
const fileTimestamp = timestamp.replace(/[:.]/g, "-");
|
const fileTimestamp = timestamp.replace(/[:.]/g, "-");
|
||||||
this.sessionFile = join(this.getSessionDir(), `${fileTimestamp}_${this.sessionId}.jsonl`);
|
this.sessionFile = join(this.getSessionDir(), `${fileTimestamp}_${this.sessionId}.jsonl`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue