mirror of
https://github.com/openai/codex.git
synced 2026-05-01 11:52:10 +03:00
Move environment abstraction into exec server (#15125)
The idea is that codex-exec exposes an Environment struct with services on it. Each of those is a trait. Depending on construction parameters passed to Environment they are either backed by local or remote server but core doesn't see these differences.
This commit is contained in:
11
codex-rs/exec-server/src/environment.rs
Normal file
11
codex-rs/exec-server/src/environment.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use crate::fs;
|
||||
use crate::fs::ExecutorFileSystem;
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct Environment;
|
||||
|
||||
impl Environment {
|
||||
pub fn get_filesystem(&self) -> impl ExecutorFileSystem + use<> {
|
||||
fs::LocalFileSystem
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user