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

Method with_todo_update

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

Source from the content-addressed store, hash-verified

584 }
585
586 pub fn with_todo_update<F, Fut>(mut self, callback: F) -> Self
587 where
588 F: Fn(String, Vec<TodoItemData>) -> Fut + Send + Sync + 'static,
589 Fut: std::future::Future<Output = Result<(), ToolError>> + Send + 'static,
590 {
591 self.todo_update = Some(Arc::new(move |session_id, todos| {
592 Box::pin(callback(session_id, todos))
593 }));
594 self
595 }
596
597 pub async fn do_todo_update(&self, todos: Vec<TodoItemData>) -> Result<(), ToolError> {
598 if let Some(ref callback) = self.todo_update {

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected