mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
Support multiple managed environments
Refactor EnvironmentManager to own a keyed environment registry with explicit default and local lookups. Keep remote exec-server connections lazy at environment use sites and preserve disabled agent environment access separately from internal local environment access. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -49,13 +49,13 @@ enum ProcessEventSnapshot {
|
||||
async fn create_process_context(use_remote: bool) -> Result<ProcessContext> {
|
||||
if use_remote {
|
||||
let server = exec_server().await?;
|
||||
let environment = Environment::create(Some(server.websocket_url().to_string())).await?;
|
||||
let environment = Environment::create(Some(server.websocket_url().to_string()))?;
|
||||
Ok(ProcessContext {
|
||||
backend: environment.get_exec_backend(),
|
||||
server: Some(server),
|
||||
})
|
||||
} else {
|
||||
let environment = Environment::create(/*exec_server_url*/ None).await?;
|
||||
let environment = Environment::create(/*exec_server_url*/ None)?;
|
||||
Ok(ProcessContext {
|
||||
backend: environment.get_exec_backend(),
|
||||
server: None,
|
||||
|
||||
Reference in New Issue
Block a user