mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:11:24 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -4,7 +4,7 @@ import readline from "node:readline";
|
||||
|
||||
import type { NormalizedUsage, UsageLike } from "../agents/usage.js";
|
||||
import { normalizeUsage } from "../agents/usage.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import type { SessionEntry } from "../config/sessions/types.js";
|
||||
import {
|
||||
resolveSessionFilePath,
|
||||
@@ -138,7 +138,7 @@ const applyCostTotal = (totals: CostUsageTotals, costTotal: number | undefined)
|
||||
|
||||
async function scanUsageFile(params: {
|
||||
filePath: string;
|
||||
config?: MoltbotConfig;
|
||||
config?: OpenClawConfig;
|
||||
onEntry: (entry: ParsedUsageEntry) => void;
|
||||
}): Promise<void> {
|
||||
const fileStream = fs.createReadStream(params.filePath, { encoding: "utf-8" });
|
||||
@@ -170,7 +170,7 @@ async function scanUsageFile(params: {
|
||||
|
||||
export async function loadCostUsageSummary(params?: {
|
||||
days?: number;
|
||||
config?: MoltbotConfig;
|
||||
config?: OpenClawConfig;
|
||||
agentId?: string;
|
||||
}): Promise<CostUsageSummary> {
|
||||
const days = Math.max(1, Math.floor(params?.days ?? 30));
|
||||
@@ -233,7 +233,7 @@ export async function loadSessionCostSummary(params: {
|
||||
sessionId?: string;
|
||||
sessionEntry?: SessionEntry;
|
||||
sessionFile?: string;
|
||||
config?: MoltbotConfig;
|
||||
config?: OpenClawConfig;
|
||||
}): Promise<SessionCostSummary | null> {
|
||||
const sessionFile =
|
||||
params.sessionFile ??
|
||||
|
||||
Reference in New Issue
Block a user