mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
83a60fdb94
Adds an environment crate and environment + file system abstraction. Environment is a combination of attributes and services specific to environment the agent is connected to: File system, process management, OS, default shell. The goal is to move most of agent logic that assumes environment to work through the environment abstraction.
19 lines
405 B
Rust
19 lines
405 B
Rust
pub mod fs;
|
|
|
|
pub use fs::CopyOptions;
|
|
pub use fs::CreateDirectoryOptions;
|
|
pub use fs::ExecutorFileSystem;
|
|
pub use fs::FileMetadata;
|
|
pub use fs::FileSystemResult;
|
|
pub use fs::ReadDirectoryEntry;
|
|
pub use fs::RemoveOptions;
|
|
|
|
#[derive(Clone, Debug, Default)]
|
|
pub struct Environment;
|
|
|
|
impl Environment {
|
|
pub fn get_filesystem(&self) -> impl ExecutorFileSystem + use<> {
|
|
fs::LocalFileSystem
|
|
}
|
|
}
|