Fix dead code in content_block_stop handler and hardcoded provider names
- Remove dead tool lookup in ClaudeAdapter's content_block_stop handler that retrieved an in-flight tool but never used it - Replace hardcoded provider name comparison with Schema.is(ProviderKind) in ProviderCommandReactor for type-safe exhaustiveness checking Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 parent
33791cdfe5
commit
fab42af65c
2 files changed
+6
-9
No files matched your search
@@ -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({
|
||||
|
||||
@@ -1373,10 +1373,6 @@ function makeClaudeAdapter(options?: ClaudeAdapterLiveOptions) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
const tool = context.inFlightTools.get(index);
|
||||
if (!tool) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user