pub struct AgentHandle { /* private fields */ }Implementations§
Source§impl AgentHandle
impl AgentHandle
Sourcepub fn start(
config: Arc<Config>,
credentials: Arc<Credentials>,
tools: Catalog,
) -> Result<Self, String>
pub fn start( config: Arc<Config>, credentials: Arc<Credentials>, tools: Catalog, ) -> Result<Self, String>
Starts chat with the agent tools of the product’s selected boards.
Sourcepub fn start_with_preferences(
config: Arc<Config>,
credentials: Arc<Credentials>,
tools: Catalog,
preferences: ChatPreferences,
chat_tools: Option<Arc<dyn ChatToolServer>>,
) -> Result<Self, String>
pub fn start_with_preferences( config: Arc<Config>, credentials: Arc<Credentials>, tools: Catalog, preferences: ChatPreferences, chat_tools: Option<Arc<dyn ChatToolServer>>, ) -> Result<Self, String>
chat_tools serves the app’s tools to ACP agents, which speak MCP
themselves; Copilot and Pi call tools directly.
pub fn send(&self, command: Command) -> Result<(), String>
pub fn take_events(&self) -> Vec<Event>
pub fn attach_file(&self, path: &Path) -> Result<ContextRef, String>
Sourcepub fn read_attachment_image(
&self,
path: &Path,
limit: u64,
) -> Result<Vec<u8>, String>
pub fn read_attachment_image( &self, path: &Path, limit: u64, ) -> Result<Vec<u8>, String>
Reads a dropped image through the same regular-file, symlink, path and open-race boundary as text attachments. The caller still validates the image format and decoded dimensions.
pub fn same_runtime(&self, other: &Self) -> bool
pub fn engine(&self) -> ChatEngine
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Whether the runtime has stopped, after a startup failure or a shutdown. Reconnect starts a new one.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentHandle
impl !UnwindSafe for AgentHandle
impl Forget for AgentHandle
impl Freeze for AgentHandle
impl Move for AgentHandle
impl Send for AgentHandle
impl Sync for AgentHandle
impl Unpin for AgentHandle
impl UnsafeUnpin for AgentHandlewhere
*const ArcInner<HandleInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<HandleInner>>: UnsafeUnpin,
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