Skip to main content

SessionAgent

Trait SessionAgent 

Source
pub trait SessionAgent {
    // Required methods
    fn is_running(&self) -> bool;
    fn ensure_started(&self, block_meta: MetaMapType) -> Result<(), String>;
    fn send_message(
        &self,
        message: String,
        message_id: Option<&str>,
        record: Option<&RecordOrigin>,
    ) -> Result<SendOutcome, String>;
}

Required Methods§

Source

fn is_running(&self) -> bool

Its process is running.

Source

fn ensure_started(&self, block_meta: MetaMapType) -> Result<(), String>

Start it again from the pane’s meta if its process exited.

Source

fn send_message( &self, message: String, message_id: Option<&str>, record: Option<&RecordOrigin>, ) -> Result<SendOutcome, String>

Send a user message as a prompt (a turn). record says where it came from, for the transcript record of it where the agent’s protocol leaves none (AcpController::send_message_from). Deferred: the agent has not seen it yet (no session yet, or a turn in flight that it must end first).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§