pub struct InteractiveSession { /* private fields */ }Implementations§
Source§impl InteractiveSession
impl InteractiveSession
pub fn session_id(&self) -> &str
pub fn agent_name(&self) -> &str
pub fn session(&self) -> Arc<dyn Session> ⓘ
pub fn subscribe(&self) -> InteractiveSessionSubscription
pub fn messages(&self) -> Vec<Message>
pub fn latest_run(&self) -> Option<RunResult>
pub fn running(&self) -> bool
pub fn closed(&self) -> bool
pub fn active_run_handle(&self) -> Option<RunHandle>
pub fn state(&self) -> InteractiveSessionState
pub fn close(&self) -> bool
pub fn steer( &self, prompt: impl Into<String>, ) -> Result<(), InteractiveSessionError>
pub fn follow_up( &self, prompt: impl Into<String>, ) -> Result<(), InteractiveSessionError>
pub fn clear_queues(&self) -> Result<(), InteractiveSessionError>
pub fn approve( &self, request_id: impl AsRef<str>, decision: ApprovalDecision, ) -> Result<(), ApprovalError>
pub fn cancel(&self) -> bool
pub async fn prompt( &self, prompt: impl Into<String>, ) -> Result<RunResult, InteractiveSessionError>
pub async fn prompt_once( &self, prompt: impl Into<String>, ) -> Result<RunResult, InteractiveSessionError>
pub async fn continue_run( &self, prompt: Option<&str>, ) -> Result<RunResult, InteractiveSessionError>
pub async fn query( &self, prompt: impl Into<String>, ) -> Result<String, InteractiveSessionError>
pub async fn replace_messages( &self, messages: Vec<Message>, ) -> Result<(), InteractiveSessionError>
Trait Implementations§
Source§impl Clone for InteractiveSession
impl Clone for InteractiveSession
Source§fn clone(&self) -> InteractiveSession
fn clone(&self) -> InteractiveSession
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for InteractiveSession
impl !UnwindSafe for InteractiveSession
impl Freeze for InteractiveSession
impl Send for InteractiveSession
impl Sync for InteractiveSession
impl Unpin for InteractiveSession
impl UnsafeUnpin for InteractiveSession
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.