# v0.4.52 (2026-05-17)
## Features - Add Vercel AI Gateway provider support (#1183) - rtk: Kiro format tool result compression — handle conversationState.history & currentMessage, preserve error results, ~13.6% savings (#1194) ## Fixes - openclaw: normalize agent.model object form `{primary, fallbacks}` before .startsWith → fix TypeError & 'not configured' status (#1216) - Usage Details pagination: stay inside mobile viewport <640px (#1218) - Fix test model error - Fix MIMO provider in Codex - Disable log file creation when using MITM AG
This commit is contained in:
@@ -14,6 +14,16 @@ const err = (msg) => console.error(`[${time()}] ❌ [MITM] ${msg}`);
|
||||
const DUMP_DIR = path.join(DATA_DIR, "logs", "mitm");
|
||||
if (!fs.existsSync(DUMP_DIR)) fs.mkdirSync(DUMP_DIR, { recursive: true });
|
||||
|
||||
// Clear all files inside DUMP_DIR (called on MITM server start to avoid unbounded growth)
|
||||
function clearDumpDir() {
|
||||
try {
|
||||
if (!fs.existsSync(DUMP_DIR)) return;
|
||||
for (const f of fs.readdirSync(DUMP_DIR)) {
|
||||
try { fs.rmSync(path.join(DUMP_DIR, f), { recursive: true, force: true }); } catch { /* ignore */ }
|
||||
}
|
||||
} catch { /* ignore */ }
|
||||
}
|
||||
|
||||
const EMPTY_BODY_RE = /^\s*(\{\s*\}|\[\s*\]|null)?\s*$/;
|
||||
|
||||
function slugify(s, max = 80) {
|
||||
@@ -93,4 +103,4 @@ function createResponseDumper(req, tag = "raw") {
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = { log, err, dumpRequest, createResponseDumper };
|
||||
module.exports = { log, err, dumpRequest, createResponseDumper, clearDumpDir };
|
||||
|
||||
Reference in New Issue
Block a user