mirror of
https://github.com/openai/codex.git
synced 2026-11-06 00:30:29 +00:00
Make local environment optional in EnvironmentManager (#23369)
## Summary - make `EnvironmentManager` local environment/runtime paths optional - simplify constructor surface around snapshot materialization - rename local env accessors to `require_local_environment` / `try_local_environment` ## Validation - devbox Bazel build for touched crate surfaces - `//codex-rs/exec-server:exec-server-unit-tests` - `//codex-rs/app-server-client:app-server-client-unit-tests` - filtered touched `//codex-rs/core:core-unit-tests` cases
This commit is contained in:
1 parent
7f4d7ae3a4
commit
5c43a64e2b
26 files changed
+853
-298
No files matched your search
@@ -1050,14 +1050,13 @@ impl Session {
|
||||
.cloned();
|
||||
let mcp_runtime_environment = match turn_environment {
|
||||
Some(turn_environment) => McpRuntimeEnvironment::new(
|
||||
Arc::clone(&turn_environment.environment),
|
||||
Some(Arc::clone(&turn_environment.environment)),
|
||||
sess.services.environment_manager.try_local_environment(),
|
||||
turn_environment.cwd.to_path_buf(),
|
||||
),
|
||||
None => McpRuntimeEnvironment::new(
|
||||
sess.services
|
||||
.environment_manager
|
||||
.default_environment()
|
||||
.unwrap_or_else(|| sess.services.environment_manager.local_environment()),
|
||||
sess.services.environment_manager.default_or_local_environment(),
|
||||
sess.services.environment_manager.try_local_environment(),
|
||||
session_configuration.cwd.to_path_buf(),
|
||||
),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user