Skip to contents

Tool: Git Diff

Usage

btw_tool_git_diff(ref = NULL, `_intent` = "")

Arguments

ref

a reference such as "HEAD", or a commit id, or NULL to the diff the working directory against the repository index.

_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.

Value

Returns a diff patch as a formatted string.

Examples

if (FALSE) { # \dontrun{
btw_tool_git_diff()
btw_tool_git_diff(ref = "HEAD")
} # }