R/tools-builtin.R
tool_edit_file.Rd
Replace a specific text span in an existing file.
tool_edit_file(path, old_text, new_text, replace_all = FALSE)
A tool definition created with ellmer::tool().
ellmer::tool()
Path to the file to edit (tool argument)
Existing text to replace (tool argument)
Replacement text (tool argument)
If TRUE, replace all matches instead of requiring a unique match (tool argument)