(
&self,
path: &str,
old_string: &str,
new_string: &str,
replace_all: bool,
)
| 59 | } |
| 60 | |
| 61 | pub(super) async fn edit_file( |
| 62 | &self, |
| 63 | path: &str, |
| 64 | old_string: &str, |
| 65 | new_string: &str, |
| 66 | replace_all: bool, |
| 67 | ) -> Result<ToolCallResult> { |
| 68 | let args = serde_json::json!({ |
| 69 | "file_path": path, |
| 70 | "old_string": old_string, |
| 71 | "new_string": new_string, |
| 72 | "replace_all": replace_all, |
| 73 | }); |
| 74 | self.call("edit", args).await |
| 75 | } |
| 76 | |
| 77 | pub(super) async fn patch_file(&self, path: &str, diff: &str) -> Result<ToolCallResult> { |
| 78 | let args = serde_json::json!({ "file_path": path, "diff": diff }); |