chore(release): v3.7.5 — integrate remaining PRs and finalize stability

This commit is contained in:
diegosouzapw
2026-04-29 17:19:29 -03:00
parent 505394efab
commit 0578d8a2db
4 changed files with 103 additions and 0 deletions

35
patch2.js Normal file
View File

@@ -0,0 +1,35 @@
const fs = require("fs");
let file = fs.readFileSync("tests/unit/reasoning-cache.test.ts", "utf8");
// Replace the before/after blocks
file = file.replace(
/describe\("Reasoning Replay Cache — API Route", \(\) => {[\s\S]*?(?= it\("should return stats)/m,
`describe("Reasoning Replay Cache — API Route", () => {
before(() => {
clearReasoningCacheAll();
try {
getDbInstance().prepare(
"INSERT OR IGNORE INTO api_keys (key, name, role, is_active) VALUES ('test-admin-key', 'test', 'admin', 1)"
).run();
} catch (e) {}
});
after(() => {
clearReasoningCacheAll();
try {
getDbInstance().prepare("DELETE FROM api_keys WHERE key = 'test-admin-key'").run();
} catch (e) {}
});\n\n`
);
// Add Headers
file = file.replace(
/new Request\("http:\/\/localhost\/api\/cache\/reasoning\?provider=deepseek"\)/g,
'new Request("http://localhost/api/cache/reasoning?provider=deepseek", { headers: { Authorization: "Bearer test-admin-key" } })'
);
file = file.replace(
/new Request\("http:\/\/localhost\/api\/cache\/reasoning\?toolCallId=call_api_delete_1"\)/g,
'new Request("http://localhost/api/cache/reasoning?toolCallId=call_api_delete_1", { headers: { Authorization: "Bearer test-admin-key" } })'
);
fs.writeFileSync("tests/unit/reasoning-cache.test.ts", file);