Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): banked Claude resets are read at most every ten minutes per account #19474

ClosedAdEx-Partners-DE(GitHub profile, opens in a new tab)wants to merge 13 commits intomain fromrefs/pull/19474/headopened View on GitHub

Showing 5 changed files with 50 additions and 15 deletions (loading 4).

x
0 of 5 viewed, 5 left
50 additions and 15 deletionsapps/server/src/provider/Drivers/ClaudeDriver.tsModified
View file
@@ -5,6 +5,7 @@
import * as Effect from "effect/Effect";
import * as Exit from "effect/Exit";
import * as FileSystem from "effect/FileSystem";
+import * as Option from "effect/Option";
import * as Path from "effect/Path";
import * as Ref from "effect/Ref";
import * as Schema from "effect/Schema";
@@ -122,6 +123,7 @@
config,
}) {
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
+ const crypto = yield* Crypto.Crypto;
const fileSystem = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
// The server cwd is $HOME in packaged desktop builds, and `claude`
@@ -255,7 +257,44 @@
Effect.map((result) => result.capabilities),
​
- const checkProvider = catalogService.refreshInBackground.pipe(
+ const readResetAccount = ClaudeResetCredits.readClaudeResetCreditAccount(
+ configDir,
+ accountConfigPath,
+ ).pipe(
+ Effect.provideService(FileSystem.FileSystem, fileSystem),
+ Effect.provideService(Path.Path, path),
+ Effect.provideService(Crypto.Crypto, crypto),