pub struct AcpClient { /* private fields */ }Implementations§
Source§impl AcpClient
impl AcpClient
pub fn start( command: &str, args: &[String], env: &[(String, String)], ) -> Result<Self>
pub async fn initialize(&mut self) -> Result<InitializeResponse>
pub async fn authenticate( &mut self, method_id: &str, ) -> Result<AuthenticateResponse>
pub async fn new_session( &mut self, cwd: &str, mcp_servers: Vec<McpServer>, ) -> Result<NewSessionResponse>
pub async fn load_session( &mut self, session_id: &str, cwd: &str, mcp_servers: Vec<McpServer>, ) -> Result<LoadSessionResponse>
pub async fn send_prompt(&mut self, text: &str) -> Result<()>
pub async fn send_prompt_with_content( &mut self, content: Vec<ContentBlock>, ) -> Result<()>
pub async fn read_next(&mut self) -> Result<AcpMessage>
pub async fn cancel(&mut self) -> Result<()>
pub async fn set_mode( &mut self, mode_id: &str, ) -> Result<SetSessionModeResponse>
pub fn drain_notifications(&mut self) -> Vec<SessionNotification>
pub fn drain_incoming_requests(&mut self) -> Vec<JsonRpcRequest>
pub async fn respond(&mut self, id: u64, result: Value) -> Result<()>
pub async fn respond_error( &mut self, id: u64, code: i32, message: &str, ) -> Result<()>
pub fn session_id(&self) -> Option<&str>
pub fn agent_info(&self) -> Option<&Implementation>
pub fn current_mode(&self) -> Option<&str>
pub fn available_modes(&self) -> &[SessionMode]
pub fn set_current_mode(&mut self, mode_id: &str)
pub fn config_options(&self) -> &[SessionConfigOption]
pub fn set_config_options(&mut self, options: Vec<SessionConfigOption>)
pub fn kill(&mut self) -> Result<()>
Auto Trait Implementations§
impl !Freeze for AcpClient
impl !RefUnwindSafe for AcpClient
impl Send for AcpClient
impl Sync for AcpClient
impl Unpin for AcpClient
impl UnsafeUnpin for AcpClient
impl !UnwindSafe for AcpClient
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> 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 more