MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / do_switch_agent

Method do_switch_agent

crates/opencode-tool/src/tool.rs:416–426  ·  view source on GitHub ↗
(
        &self,
        agent: String,
        model: Option<String>,
    )

Source from the content-addressed store, hash-verified

414 }
415
416 pub async fn do_switch_agent(
417 &self,
418 agent: String,
419 model: Option<String>,
420 ) -> Result<(), ToolError> {
421 if let Some(ref callback) = self.switch_agent {
422 callback(agent, model).await
423 } else {
424 Ok(())
425 }
426 }
427
428 pub fn with_create_subsession<F, Fut>(mut self, callback: F) -> Self
429 where

Callers 1

executeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected