Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): count every provider instance on the Usage page #7419

ClosedMatthewFoxAF(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/7419/headopened View on GitHub

Showing 4 changed files with 144 additions and 27 deletions (loading 2).

x
0 of 4 viewed, 4 left
9 additions and 27 deletionsapps/server/src/usage/UsageService.tsModified
View file
@@ -35,8 +35,6 @@
​
import { ServerConfig } from "../config.ts";
import * as ServerSettings from "../serverSettings.ts";
-import { resolveClaudeHomePath } from "../provider/Drivers/ClaudeHome.ts";
-import { resolveCodexHomeLayout } from "../provider/Drivers/CodexHomeLayout.ts";
import { UsageAggregator } from "./usageAggregation.ts";
import { parseRateTable, type RateTable } from "./usagePricing.ts";
import {
@@ -51,6 +49,7 @@
pruneScanCache,
type ScanCache,
} from "./usageScanCache.ts";
+import { resolveUsageTranscriptDirs } from "./usageTranscriptDirs.ts";
import type { UsageRecord } from "./usageTranscripts.ts";
​
const LITELLM_RATES_URL =
@@ -184,20 +183,7 @@
});
​
- /**
- * Claude's config dir is the home itself when overridden, but a default
- * install nests transcripts under `~/.claude/projects`. Probe both.
- */
- const resolveClaudeTranscriptDir = (homePath: string) =>
- Effect.gen(function* () {
- const nested = path.join(homePath, ".claude", "projects");