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

Method with_lsp_touch_file

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

Source from the content-addressed store, hash-verified

565 }
566
567 pub fn with_lsp_touch_file<F, Fut>(mut self, callback: F) -> Self
568 where
569 F: Fn(String, bool) -> Fut + Send + Sync + 'static,
570 Fut: std::future::Future<Output = Result<(), ToolError>> + Send + 'static,
571 {
572 self.lsp_touch_file = Some(Arc::new(move |file_path, write| {
573 Box::pin(callback(file_path, write))
574 }));
575 self
576 }
577
578 pub async fn do_lsp_touch_file(&self, file_path: String, write: bool) -> Result<(), ToolError> {
579 if let Some(ref callback) = self.lsp_touch_file {

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected