MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / with_get_last_model

Method with_get_last_model

crates/opencode-tool/src/tool.rs:622–629  ·  view source on GitHub ↗
(mut self, callback: F)

Source from the content-addressed store, hash-verified

620 }
621
622 pub fn with_get_last_model<F, Fut>(mut self, callback: F) -> Self
623 where
624 F: Fn(String) -> Fut + Send + Sync + 'static,
625 Fut: std::future::Future<Output = Result<Option<String>, ToolError>> + Send + 'static,
626 {
627 self.get_last_model = Some(Arc::new(move |session_id| Box::pin(callback(session_id))));
628 self
629 }
630
631 pub async fn do_get_last_model(&self) -> Option<String> {
632 if let Some(ref callback) = self.get_last_model {

Calls 1

newFunction · 0.85

Tested by

no test coverage detected