fix(adapter): support dangerouslyBypassSandbox alias in codex-local
Fall back to dangerouslyBypassSandbox when the full dangerouslyBypassApprovalsAndSandbox flag is not set, keeping the UI toggle in sync with either config key. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,10 @@ export async function execute(ctx: AdapterExecutionContext): Promise<AdapterExec
|
||||
asString(config.reasoningEffort, ""),
|
||||
);
|
||||
const search = asBoolean(config.search, false);
|
||||
const bypass = asBoolean(config.dangerouslyBypassApprovalsAndSandbox, false);
|
||||
const bypass = asBoolean(
|
||||
config.dangerouslyBypassApprovalsAndSandbox,
|
||||
asBoolean(config.dangerouslyBypassSandbox, false),
|
||||
);
|
||||
|
||||
const cwd = asString(config.cwd, process.cwd());
|
||||
await ensureAbsoluteDirectory(cwd);
|
||||
|
||||
@@ -12,6 +12,9 @@ export function CodexLocalConfigFields({
|
||||
eff,
|
||||
mark,
|
||||
}: AdapterConfigFieldsProps) {
|
||||
const bypassEnabled =
|
||||
config.dangerouslyBypassApprovalsAndSandbox === true || config.dangerouslyBypassSandbox === true;
|
||||
|
||||
return (
|
||||
<>
|
||||
<ToggleField
|
||||
@@ -23,7 +26,7 @@ export function CodexLocalConfigFields({
|
||||
: eff(
|
||||
"adapterConfig",
|
||||
"dangerouslyBypassApprovalsAndSandbox",
|
||||
config.dangerouslyBypassApprovalsAndSandbox !== false,
|
||||
bypassEnabled,
|
||||
)
|
||||
}
|
||||
onChange={(v) =>
|
||||
|
||||
Reference in New Issue
Block a user