mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 04:07:39 +00:00
refactor(session): centralize transcript path option resolution
This commit is contained in:
@@ -6,6 +6,7 @@ import { SessionManager } from "@mariozechner/pi-coding-agent";
|
||||
import {
|
||||
resolveDefaultSessionStorePath,
|
||||
resolveSessionFilePath,
|
||||
resolveSessionFilePathOptions,
|
||||
} from "../../config/sessions/paths.js";
|
||||
import { loadSessionStore } from "../../config/sessions/store.js";
|
||||
import type { SessionEntry } from "../../config/sessions/types.js";
|
||||
@@ -126,10 +127,11 @@ export async function buildExportSessionReply(params: HandleCommandsParams): Pro
|
||||
|
||||
let sessionFile: string;
|
||||
try {
|
||||
sessionFile = resolveSessionFilePath(entry.sessionId, entry, {
|
||||
agentId: params.agentId,
|
||||
sessionsDir: path.dirname(storePath),
|
||||
});
|
||||
sessionFile = resolveSessionFilePath(
|
||||
entry.sessionId,
|
||||
entry,
|
||||
resolveSessionFilePathOptions({ agentId: params.agentId, storePath }),
|
||||
);
|
||||
} catch (err) {
|
||||
return {
|
||||
text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}`,
|
||||
|
||||
Reference in New Issue
Block a user