@devries-cameron20 / t3code Mirror · read-only / commits / f5ad87d305
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 17:00 UTC

chore(lint): enforce optionMatchToFromOption (#25088)

Julius Marminge committed Oct 25, 2026 at 18:18 UTC f5ad87d3054cad7aff4327508286510505871b97
4 files changed +25 -30
apps/server/src/ws.ts
+8 -10
@@ -1406,16 +1406,14 @@ export const layerWsRpc = (
1406 }),
1407 ),
1408 );
1409 - return yield* Option.match(project, {
1410 - onNone: () =>
1411 - Effect.fail(
1412 - new AcpRegistryOperationError({
1413 - reason: "project_not_found",
1414 - message: `Project ${projectId} was not found.`,
1415 - }),
1416 - ),
1417 - onSome: Effect.succeed,
1418 - });
1409 + return yield* Effect.fromOption(
1410 + project,
1411 + () =>
1412 + new AcpRegistryOperationError({
1413 + reason: "project_not_found",
1414 + message: `Project ${projectId} was not found.`,
1415 + }),
1416 + );
1417 });
1418
1419 const acpSessionManager = Effect.fn("ws.acpRegistry.sessionManager")(function* (
packages/provider-acp-registry/src/server/auth.ts
+6 -8
@@ -142,14 +142,12 @@ export const makeAcpRegistryAuth = Effect.fn("makeAcpRegistryAuth")(function* (o
142 .runBackgroundProbe(agentKey, discoverMethods)
143 .pipe(
144 Effect.flatMap((result) =>
145 - Option.isSome(result)
146 - ? Effect.succeed(result.value)
147 - : Effect.fail(
148 - failure(
149 - "methods",
150 - "Sign-in discovery was interrupted by an active provider session. Try again.",
151 - ),
152 - ),
145 + Effect.fromOption(result, () =>
146 + failure(
147 + "methods",
148 + "Sign-in discovery was interrupted by an active provider session. Try again.",
149 + ),
150 + ),
151 ),
152 )
153 : discoverMethods;
packages/provider-acp/src/server/AcpSessionRuntime.ts
+10 -12
@@ -1958,18 +1958,16 @@ export const make = Effect.fn("AcpSessionRuntime.make")(function* (
1958 Effect.ensuring(Fiber.interrupt(idleFiber).pipe(Effect.ignore)),
1959 Effect.timeoutOption(sessionLoadTimeout),
1960 Effect.flatMap((result) =>
1961 - Option.match(result, {
1962 - onNone: () =>
1963 - Effect.fail(
1964 - new EffectAcpErrors.AcpTransportError({
1965 - operation: "call-rpc",
1966 - method: "session/load",
1967 - detail: "session/load timed out waiting for RPC response or replay idle gap",
1968 - cause: undefined,
1969 - }),
1970 - ),
1971 - onSome: Effect.succeed,
1972 - }),
1961 + Effect.fromOption(
1962 + result,
1963 + () =>
1964 + new EffectAcpErrors.AcpTransportError({
1965 + operation: "call-rpc",
1966 + method: "session/load",
1967 + detail: "session/load timed out waiting for RPC response or replay idle gap",
1968 + cause: undefined,
1969 + }),
1970 + ),
1971 ),
1972 Effect.tap((result) =>
1973 logRequest({
tsconfig.base.json
+1
@@ -24,6 +24,7 @@
24 "namespaceImportPackages": ["@effect/platform-node", "effect"],
25 "effectFn": ["span", "inferred-span", "suggested-span"],
26 "diagnosticSeverity": {
27 + "optionMatchToFromOption": "error",
28 "catchToIgnore": "error",
29 "unnecessaryEffectGen": "error",
30 "allOfMapToForEach": "error",