Learn R Programming

btw (version 1.2.0)

btw_tool_files_edit: Tool: Edit a text file

Description

Tool: Edit a text file

Usage

btw_tool_files_edit(path, edits, `_intent` = "")

Value

Returns a message confirming the edits were applied.

Arguments

path

Path to the file to edit. The path must be in the current working directory.

edits

A list of edit operations. Each edit is a named list with action, line, and content fields.

_intent

An optional string describing the intent of the tool use. When the tool is used by an LLM, the model will use this argument to explain why it called the tool.

See Also

Other files tools: btw_tool_files_list(), btw_tool_files_read(), btw_tool_files_replace(), btw_tool_files_search(), btw_tool_files_write()