(&self, path: String, diff: String)
| 3783 | /// Apply a unified diff patch to a workspace file. |
| 3784 | #[napi] |
| 3785 | pub async fn patch_file(&self, path: String, diff: String) -> napi::Result<ToolResult> { |
| 3786 | let session = self.inner.clone(); |
| 3787 | let result = get_runtime() |
| 3788 | .spawn(async move { session.patch_file(&path, &diff).await }) |
| 3789 | .await |
| 3790 | .map_err(|e| napi::Error::from_reason(format!("Task join error: {e}")))? |
| 3791 | .map_err(|e| napi::Error::from_reason(format!("{e}")))?; |
| 3792 | Ok(tool_result_from_core(result)) |
| 3793 | } |
| 3794 | |
| 3795 | /// Execute a bash command in the workspace. |
| 3796 | #[napi] |
nothing calls this directly
no test coverage detected