Remove legacy turn context environment fields

Switch TurnContext to carry only the selected environment list and explicit-selection marker. Preserve the no-list rollout path by representing the default environment internally with no environment id while keeping multi-environment tool rendering disabled unless explicit selections are present.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-04-21 12:25:04 -07:00
co-authored by Codex
parent 590262b840
commit 841e2f0e85
46 changed files with 602 additions and 357 deletions
+1 -1
View File
@@ -32,10 +32,10 @@ pub(crate) struct ApplyPatchRuntimeInvocation {
pub(crate) async fn apply_patch(
turn_context: &TurnContext,
cwd: &codex_utils_absolute_path::AbsolutePathBuf,
file_system_sandbox_policy: &FileSystemSandboxPolicy,
action: ApplyPatchAction,
) -> InternalApplyPatchInvocation {
let cwd = &action.cwd;
match assess_patch_safety(
&action,
turn_context.approval_policy.value(),