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

Method with_ask_question

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

Source from the content-addressed store, hash-verified

381 }
382
383 pub fn with_ask_question<F, Fut>(mut self, callback: F) -> Self
384 where
385 F: Fn(Vec<QuestionDef>) -> Fut + Send + Sync + 'static,
386 Fut: std::future::Future<Output = Result<Vec<Vec<String>>, ToolError>> + Send + 'static,
387 {
388 self.ask_question = Some(Arc::new(move |questions| Box::pin(callback(questions))));
389 self
390 }
391
392 pub async fn question(
393 &self,

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected