Schema.is

This commit is contained in:
Julius Marminge committed 2026-03-16 15:48:28 -07:00
1 parent 33791cdfe5
commit f34dd0a91f
1 file changed
+6 -5
@@ -4,7 +4,7 @@ import {
EventId,
type OrchestrationEvent,
type ProviderModelOptions,
type ProviderKind,
ProviderKind,
type ProviderStartOptions,
type OrchestrationSession,
ThreadId,
@@ -205,10 +205,11 @@ const make = Effect.gen(function* () {
}
const desiredRuntimeMode = thread.runtimeMode;
const currentProvider: ProviderKind | undefined =
thread.session?.providerName === "codex" || thread.session?.providerName === "claudeAgent"
? thread.session.providerName
: undefined;
const currentProvider: ProviderKind | undefined = Schema.is(ProviderKind)(
thread.session?.providerName,
)
? thread.session.providerName
: undefined;
const preferredProvider: ProviderKind | undefined = options?.provider ?? currentProvider;
const desiredModel = options?.model ?? thread.model;
const effectiveCwd = resolveThreadWorkspaceCwd({