pub struct AgentWorkspace { /* private fields */ }Implementations§
Source§impl AgentWorkspace
impl AgentWorkspace
pub fn for_prompt( prompt: &str, config: &AgentWorkspaceConfig, ) -> Result<Self, AgentError>
pub fn root(&self) -> &Path
Sourcepub fn last_command_result(&self) -> Option<&AgentCommandResult>
pub fn last_command_result(&self) -> Option<&AgentCommandResult>
The result of the most recently run command, if any.
A short-lived plan uses Self::finish to collect every result at once,
but a long-lived workspace (the agentic driver reuses one across a whole
tool-call loop) needs to observe each command’s output between steps,
before finish consumes the workspace.
pub fn create_file(&mut self, path: &str, content: &str)
pub fn modify_file(&mut self, path: &str, content: &str)
pub fn delete_file(&mut self, path: &str)
pub fn run_command(&mut self, command_line: &str)
pub fn finish(self) -> AgentRun
Auto Trait Implementations§
impl Freeze for AgentWorkspace
impl RefUnwindSafe for AgentWorkspace
impl Send for AgentWorkspace
impl Sync for AgentWorkspace
impl Unpin for AgentWorkspace
impl UnsafeUnpin for AgentWorkspace
impl UnwindSafe for AgentWorkspace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more