Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): usage counts every configured provider instance #8470

ClosedDonovanMontoya(GitHub profile, opens in a new tab)wants to merge 10 commits intomain fromrefs/pull/8470/headopened View on GitHub

Showing 12 changed files with 122 additions and 8 deletions (loading 11).

x
0 of 12 viewed, 12 left
122 additions and 8 deletionsapps/server/src/usage/UsageService.test.tsModified
View file
@@ -6,7 +6,7 @@
​
import { assert, describe, it } from "@effect/vitest";
import * as NodeServices from "@effect/platform-node/NodeServices";
-import { HostProcessEnvironment } from "@t3tools/shared/hostProcess";
+import { HostProcessEnvironment, HostProcessPlatform } from "@t3tools/shared/hostProcess";
import { UsageDay, type UsageSummaryInput } from "@t3tools/contracts";
import * as Duration from "effect/Duration";
import * as Deferred from "effect/Deferred";
@@ -170,18 +170,17 @@
const firstScanStarted = yield* Deferred.make<void>();
const secondScanStarted = yield* Deferred.make<void>();
const releaseRates = yield* Deferred.make<void>();
- let homeProbes = 0;
+ let homeResolutions = 0;
const service = yield* UsageService.make.pipe(
Effect.provideService(FileSystem.FileSystem, {
...fileSystem,
- exists: (path) =>
- fileSystem.exists(path).pipe(
+ realPath: (path) =>
+ fileSystem.realPath(path).pipe(
Effect.tap(() => {
- if (path !== NodePath.join(home, "claude", ".claude", "projects"))
- return Effect.void;
- homeProbes += 1;
+ if (path !== NodePath.join(home, "claude", "projects")) return Effect.void;
+ homeResolutions += 1;
return Deferred.succeed(