fix: use sessionFile from entry for threaded sessions
Address Codex review: prefer previousSessionEntry.sessionFile which includes thread suffix for topic sessions, fall back to resolveSessionTranscriptPath for legacy sessions.
This commit is contained in:
parent
c5ddd12612
commit
5cf0584068
@ -130,9 +130,13 @@ export async function getReplyFromConfig(
|
||||
|
||||
// Handle /reset prune - delete session entry and transcript, then return confirmation
|
||||
if (resetTriggered && pruneRequested && previousSessionEntry) {
|
||||
const transcriptPath = previousSessionEntry.sessionId
|
||||
? resolveSessionTranscriptPath(previousSessionEntry.sessionId, agentId)
|
||||
: undefined;
|
||||
// Prefer sessionFile from entry (includes thread suffix for topics),
|
||||
// fall back to resolveSessionTranscriptPath for legacy sessions
|
||||
const transcriptPath =
|
||||
previousSessionEntry.sessionFile?.trim() ||
|
||||
(previousSessionEntry.sessionId
|
||||
? resolveSessionTranscriptPath(previousSessionEntry.sessionId, agentId)
|
||||
: undefined);
|
||||
await deleteSessionEntry({
|
||||
storePath,
|
||||
sessionKey,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user