Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

[codex] migrate Effect.fn in apps/server/src/provider/Layers/ClaudeProvider.ts (#1634)

Julius Marminge67ca528fea4a
diff --git a/apps/server/src/provider/Layers/ClaudeProvider.ts b/apps/server/src/provider/Layers/ClaudeProvider.ts
index 158a9ef25..761b795fe 100644
--- a/apps/server/src/provider/Layers/ClaudeProvider.ts
+++ b/apps/server/src/provider/Layers/ClaudeProvider.ts
@@ -427,17 +427,16 @@ const probeClaudeCapabilities = (binaryPath: string) => {
);
};
-const runClaudeCommand = (args: ReadonlyArray<string>) =>
- Effect.gen(function* () {
- const claudeSettings = yield* Effect.service(ServerSettingsService).pipe(
- Effect.flatMap((service) => service.getSettings),
- Effect.map((settings) => settings.providers.claudeAgent),
- );
- const command = ChildProcess.make(claudeSettings.binaryPath, [...args], {
- shell: process.platform === "win32",
- });
- return yield* spawnAndCollect(claudeSettings.binaryPath, command);
+const runClaudeCommand = Effect.fn("runClaudeCommand")(function* (args: ReadonlyArray<string>) {
+ const claudeSettings = yield* Effect.service(ServerSettingsService).pipe(
+ Effect.flatMap((service) => service.getSettings),
+ Effect.map((settings) => settings.providers.claudeAgent),
+ );
+ const command = ChildProcess.make(claudeSettings.binaryPath, [...args], {
+ shell: process.platform === "win32",
});
+ return yield* spawnAndCollect(claudeSettings.binaryPath, command);
+});
export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(function* (
resolveSubscriptionType?: (binaryPath: string) => Effect.Effect<string | undefined>,