A specialized AgentDriver for the GitHub gh copilot CLI extension.
Details
Setup: Requires the GitHub CLI (gh) and the copilot
extension (gh extension install github/gh-copilot). Must be
authenticated via gh auth login.
Super class
HydraR::AgentDriver -> CopilotCLIDriver
Methods
Method new()
Initialize CopilotCLIDriver
Usage
CopilotCLIDriver$new(
id = "copilot_cli",
validation_mode = "warning",
working_dir = NULL
)Method call()
Usage
CopilotCLIDriver$call(prompt, system_prompt = NULL, cli_opts = list(), ...)Examples
if (FALSE) { # \dontrun{
# 1. Use GitHub Copilot CLI extension
driver <- CopilotCLIDriver$new()
# 2. Request a terminal command with tool permissions
response <- driver$call(
prompt = "Find all CSV files larger than 1MB and move them to 'data/'",
cli_opts = list(
allow_all_tools = TRUE,
no_custom_instructions = FALSE
)
)
} # }