configurable sessions dir, exclude jsonl-sync from build, simplify db path

This commit is contained in:
Meleki committed 2026-02-21 14:10:25 +01:00
1 parent 2e5e06db93
commit 807ecac7b9
3 files changed
+5 -2

No files matched your search

+2 -1
View File
@@ -4,7 +4,8 @@ import { fileURLToPath } from 'node:url';
import Database from 'better-sqlite3';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const SESSIONS_DIR = '/home/node/.openclaw/agents/main/sessions';
import os from 'node:os';
const SESSIONS_DIR = process.env.SESSIONS_DIR || path.join(os.homedir(), '.openclaw/agents/main/sessions');
const DB_FILE = path.join(__dirname, 'sessions.db');
const db = new Database(DB_FILE);