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
|
// Handle /reset prune - delete session entry and transcript, then return confirmation
|
||||||
if (resetTriggered && pruneRequested && previousSessionEntry) {
|
if (resetTriggered && pruneRequested && previousSessionEntry) {
|
||||||
const transcriptPath = previousSessionEntry.sessionId
|
// Prefer sessionFile from entry (includes thread suffix for topics),
|
||||||
? resolveSessionTranscriptPath(previousSessionEntry.sessionId, agentId)
|
// fall back to resolveSessionTranscriptPath for legacy sessions
|
||||||
: undefined;
|
const transcriptPath =
|
||||||
|
previousSessionEntry.sessionFile?.trim() ||
|
||||||
|
(previousSessionEntry.sessionId
|
||||||
|
? resolveSessionTranscriptPath(previousSessionEntry.sessionId, agentId)
|
||||||
|
: undefined);
|
||||||
await deleteSessionEntry({
|
await deleteSessionEntry({
|
||||||
storePath,
|
storePath,
|
||||||
sessionKey,
|
sessionKey,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user