mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 09:01:14 +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.flushed = true;
|
||||
} else {
|
||||
const explicitPath = this.sessionFile;
|
||||
this.newSession();
|
||||
this.sessionFile = explicitPath; // preserve explicit path from --session flag
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -675,11 +677,11 @@ export class SessionManager {
|
|||
};
|
||||
this.fileEntries = [header];
|
||||
this.byId.clear();
|
||||
this.labelsById.clear();
|
||||
this.leafId = null;
|
||||
this.flushed = false;
|
||||
|
||||
// Only generate filename if persisting and not already set (e.g., via --session flag)
|
||||
if (this.persist && !this.sessionFile) {
|
||||
if (this.persist) {
|
||||
const fileTimestamp = timestamp.replace(/[:.]/g, "-");
|
||||
this.sessionFile = join(this.getSessionDir(), `${fileTimestamp}_${this.sessionId}.jsonl`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue