mirror of
https://github.com/openai/codex.git
synced 2026-04-27 08:05:51 +00:00
Thread executor attachment through tool handlers
This commit is contained in:
@@ -32,13 +32,19 @@ async fn create_file_system_context(use_remote: bool) -> Result<FileSystemContex
|
||||
let server = exec_server().await?;
|
||||
let environment = Environment::create(Some(server.websocket_url().to_string())).await?;
|
||||
Ok(FileSystemContext {
|
||||
file_system: environment.get_filesystem(),
|
||||
file_system: environment
|
||||
.executor_attachment()
|
||||
.expect("remote environment has an executor attachment")
|
||||
.get_filesystem(),
|
||||
_server: Some(server),
|
||||
})
|
||||
} else {
|
||||
let environment = Environment::create(/*exec_server_url*/ None).await?;
|
||||
Ok(FileSystemContext {
|
||||
file_system: environment.get_filesystem(),
|
||||
file_system: environment
|
||||
.executor_attachment()
|
||||
.expect("local environment has an executor attachment")
|
||||
.get_filesystem(),
|
||||
_server: None,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user