pub struct StagingToolDispatcher { /* private fields */ }Expand description
Tool dispatcher for a coding-agent turn: filesystem mutations
(fs write-file/edit-file/delete-file) are staged into a buffer
instead of written to disk, so the turn can be reviewed before it lands.
Everything else - fs reads, glob/grep/list-dir, and every shell
tool - runs for real through AdapterToolDispatcher. A read-file of a
staged path is served from the overlay, so the model sees its own pending
edits within the same turn.
Implementations§
Source§impl StagingToolDispatcher
impl StagingToolDispatcher
pub fn new( adapters: Arc<AdapterRegistry>, workspace: Option<String>, state: StagedEdits, ) -> Self
Sourcepub fn with_observer(self, observer: ToolObserver) -> Self
pub fn with_observer(self, observer: ToolObserver) -> Self
Attach a ToolObserver so each staged-or-delegated call emits a
ToolCall event for live UI granularity.
Trait Implementations§
Source§impl ToolDispatcher for StagingToolDispatcher
impl ToolDispatcher for StagingToolDispatcher
Auto Trait Implementations§
impl Freeze for StagingToolDispatcher
impl !RefUnwindSafe for StagingToolDispatcher
impl Send for StagingToolDispatcher
impl Sync for StagingToolDispatcher
impl Unpin for StagingToolDispatcher
impl UnsafeUnpin for StagingToolDispatcher
impl !UnwindSafe for StagingToolDispatcher
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