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

Method with_create_synthetic_message

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

Source from the content-addressed store, hash-verified

637 }
638
639 pub fn with_create_synthetic_message<F, Fut>(mut self, callback: F) -> Self
640 where
641 F: Fn(String, Option<String>, String) -> Fut + Send + Sync + 'static,
642 Fut: std::future::Future<Output = Result<(), ToolError>> + Send + 'static,
643 {
644 self.create_synthetic_message = Some(Arc::new(move |session_id, agent, text| {
645 Box::pin(callback(session_id, agent, text))
646 }));
647 self
648 }
649
650 pub async fn do_create_synthetic_message(
651 &self,

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected