mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 23:14:31 +00:00
Sessions: fix sessions_list transcriptPath path resolution
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import path from "node:path";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import { loadConfig } from "../../config/config.js";
|
||||
import { resolveSessionFilePath } from "../../config/sessions.js";
|
||||
import { resolveSessionFilePath, resolveSessionFilePathOptions } from "../../config/sessions.js";
|
||||
import { callGateway } from "../../gateway/call.js";
|
||||
import { resolveAgentIdFromSessionKey } from "../../routing/session-key.js";
|
||||
import type { AnyAgentTool } from "./common.js";
|
||||
@@ -156,13 +155,14 @@ export function createSessionsListTool(opts?: {
|
||||
let transcriptPath: string | undefined;
|
||||
if (sessionId && storePath) {
|
||||
try {
|
||||
const sessionPathOpts = resolveSessionFilePathOptions({
|
||||
agentId: resolveAgentIdFromSessionKey(key),
|
||||
storePath,
|
||||
});
|
||||
transcriptPath = resolveSessionFilePath(
|
||||
sessionId,
|
||||
sessionFile ? { sessionFile } : undefined,
|
||||
{
|
||||
agentId: resolveAgentIdFromSessionKey(key),
|
||||
sessionsDir: path.dirname(storePath),
|
||||
},
|
||||
sessionPathOpts,
|
||||
);
|
||||
} catch {
|
||||
transcriptPath = undefined;
|
||||
|
||||
Reference in New Issue
Block a user