pub struct AgentLoopInput { /* private fields */ }Implementations§
Source§impl AgentLoopInput
impl AgentLoopInput
pub fn run_id(&self) -> InteractiveRunId
Sourcepub async fn submit(
&self,
text: &str,
) -> Result<InteractiveInputItem, InteractiveError>
pub async fn submit( &self, text: &str, ) -> Result<InteractiveInputItem, InteractiveError>
Appends text to the pending queue (runs immediately when idle and not paused).
Sourcepub async fn submit_message(
&self,
message: UserMessageInput,
) -> Result<InteractiveInputItem, InteractiveError>
pub async fn submit_message( &self, message: UserMessageInput, ) -> Result<InteractiveInputItem, InteractiveError>
Appends a user message to the pending queue (runs immediately when idle and not paused).
Sourcepub async fn update_by_id(
&self,
id: QueuedInputId,
text: &str,
) -> Result<(), InteractiveError>
pub async fn update_by_id( &self, id: QueuedInputId, text: &str, ) -> Result<(), InteractiveError>
Updates a pending item’s text by its stable QueuedInputId.
Sourcepub async fn remove_by_id(
&self,
id: QueuedInputId,
) -> Result<(), InteractiveError>
pub async fn remove_by_id( &self, id: QueuedInputId, ) -> Result<(), InteractiveError>
Removes a pending item by its stable QueuedInputId.
Sourcepub async fn set_paused(&self, paused: bool) -> Result<(), InteractiveError>
pub async fn set_paused(&self, paused: bool) -> Result<(), InteractiveError>
Pauses or resumes automatic dispatch of pending items.
While paused (for example, when any pending item is being edited in a UI),
pending items will not auto-send at turn boundaries. Passing false resumes
auto-dispatch and immediately sends all pending items together if the loop is idle.
Sourcepub async fn flush(&self) -> Result<(), InteractiveError>
pub async fn flush(&self) -> Result<(), InteractiveError>
Resumes and immediately dispatches all pending items together if the loop is idle.
pub async fn replace_pending_order( &self, items: &[InteractiveInputItem], ) -> Result<(), InteractiveError>
pub async fn snapshot( &self, ) -> Result<InteractiveInputSnapshot, InteractiveError>
Trait Implementations§
Auto Trait Implementations§
impl Forget for AgentLoopInput
impl Freeze for AgentLoopInputwhere
*const ArcInner<Chan<InteractiveCommand, Semaphore>> is !null: Freeze,
PhantomData<ArcInner<Chan<InteractiveCommand, Semaphore>>>: Freeze,
impl Move for AgentLoopInput
impl RefUnwindSafe for AgentLoopInput
impl Send for AgentLoopInput
impl Sync for AgentLoopInput
impl Unpin for AgentLoopInput
impl UnsafeUnpin for AgentLoopInputwhere
*const ArcInner<Chan<InteractiveCommand, Semaphore>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Chan<InteractiveCommand, Semaphore>>>: UnsafeUnpin,
impl UnwindSafe for AgentLoopInputwhere
Arc<Chan<InteractiveCommand, Semaphore>>: UnwindSafe,
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