mirror of
https://github.com/stablyai/orca.git
synced 2026-11-02 18:17:36 +00:00
fix: apply review feedback for the watcher, guarded-save and chat-start stacks (#31216)
Fixes bugs found reviewing #30270, #30605, #30885, #30417, #31113, #30415, #30992 and #30997, and removes code those PRs made unnecessary. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
resolveProviderChildEnv,
|
||||
type ProviderProcessLaunch
|
||||
} from '../provider-process/provider-process-launch'
|
||||
import { findInErrorChain } from '../provider-process/provider-error-chain'
|
||||
|
||||
export class CodexCliInstallationError extends AgentSessionPreSpawnError {
|
||||
readonly codexInstallation: CodexInstallationProblem
|
||||
@@ -26,17 +27,10 @@ export class CodexCliInstallationError extends AgentSessionPreSpawnError {
|
||||
}
|
||||
}
|
||||
|
||||
export function codexInstallationProblemOf(
|
||||
error: unknown,
|
||||
depth = 0
|
||||
): CodexInstallationProblem | undefined {
|
||||
if (depth >= 6 || !(error instanceof Error)) {
|
||||
return undefined
|
||||
}
|
||||
if (error instanceof CodexCliInstallationError) {
|
||||
return error.codexInstallation
|
||||
}
|
||||
return codexInstallationProblemOf(error.cause, depth + 1)
|
||||
export function codexInstallationProblemOf(error: unknown): CodexInstallationProblem | undefined {
|
||||
return findInErrorChain(error, (inner) =>
|
||||
inner instanceof CodexCliInstallationError ? inner.codexInstallation : undefined
|
||||
)
|
||||
}
|
||||
|
||||
export async function requireSupportedCodexCli(
|
||||
|
||||
Reference in New Issue
Block a user