This commit is contained in:
Julius Marminge committed 2026-03-24 16:12:16 -07:00
1 parent 7984a23fbd
commit e0d4388c77
1 file changed
+2 -7
@@ -13,7 +13,7 @@ import {
type RuntimeMode,
type TurnId,
} from "@t3tools/contracts";
import { Cache, Cause, Duration, Effect, Layer, Option, Schema, Stream } from "effect";
import { Cache, Cause, Duration, Effect, Equal, Layer, Option, Schema, Stream } from "effect";
import { makeDrainableWorker } from "@t3tools/shared/DrainableWorker";
import { resolveThreadWorkspaceCwd } from "../../checkpointing/Utils.ts";
@@ -75,11 +75,6 @@ const DEFAULT_RUNTIME_MODE: RuntimeMode = "full-access";
const WORKTREE_BRANCH_PREFIX = "t3code";
const TEMP_WORKTREE_BRANCH_PATTERN = new RegExp(`^${WORKTREE_BRANCH_PREFIX}\\/[0-9a-f]{8}$`);
const sameModelSelectionOptions = (
left: ModelSelection | undefined,
right: ModelSelection | undefined,
): boolean => JSON.stringify(left ?? null) === JSON.stringify(right ?? null);
function isUnknownPendingApprovalRequestError(cause: Cause.Cause<ProviderServiceError>): boolean {
const error = Cause.squash(cause);
if (Schema.is(ProviderAdapterRequestError)(error)) {
@@ -306,7 +301,7 @@ const make = Effect.gen(function* () {
const shouldRestartForModelSelectionChange =
currentProvider === "claudeAgent" &&
requestedModelSelection !== undefined &&
!sameModelSelectionOptions(previousModelSelection, requestedModelSelection);
!Equal.equals(previousModelSelection, requestedModelSelection);
if (
!runtimeModeChanged &&