mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 16:31:23 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -4,12 +4,12 @@ import path from "node:path";
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import { loadCostUsageSummary, loadSessionCostSummary } from "./session-cost-usage.js";
|
||||
|
||||
describe("session cost usage", () => {
|
||||
it("aggregates daily totals with log cost and pricing fallback", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-cost-"));
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-cost-"));
|
||||
const sessionsDir = path.join(root, "agents", "main", "sessions");
|
||||
await fs.mkdir(sessionsDir, { recursive: true });
|
||||
const sessionFile = path.join(sessionsDir, "sess-1.jsonl");
|
||||
@@ -92,7 +92,7 @@ describe("session cost usage", () => {
|
||||
},
|
||||
},
|
||||
},
|
||||
} as ClawdbotConfig;
|
||||
} as MoltbotConfig;
|
||||
|
||||
const originalState = process.env.CLAWDBOT_STATE_DIR;
|
||||
process.env.CLAWDBOT_STATE_DIR = root;
|
||||
@@ -108,7 +108,7 @@ describe("session cost usage", () => {
|
||||
});
|
||||
|
||||
it("summarizes a single session file", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-cost-session-"));
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-cost-session-"));
|
||||
const sessionFile = path.join(root, "session.jsonl");
|
||||
const now = new Date();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user