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§
Sourcefn is_running(&self) -> bool
fn is_running(&self) -> bool
Its process is running.
Sourcefn ensure_started(&self, block_meta: MetaMapType) -> Result<(), String>
fn ensure_started(&self, block_meta: MetaMapType) -> Result<(), String>
Start it again from the pane’s meta if its process exited.
Sourcefn send_message(
&self,
message: String,
message_id: Option<&str>,
record: Option<&RecordOrigin>,
) -> Result<SendOutcome, String>
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".