feat: GitHub Copilot Provider#143
Conversation
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 8. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
| function GitHubCopilotProvider._build_command(_, query, context) | ||
| return { | ||
| "copilot", | ||
| "--allow-all-tools", | ||
| "--model", | ||
| context.model, | ||
| "--prompt", | ||
| query, | ||
| } | ||
| end |
There was a problem hiding this comment.
Bug: The GitHubCopilotProvider incorrectly expects the copilot CLI to write its response to a temp file, but the CLI outputs to stdout, resulting in empty responses.
Severity: CRITICAL
Suggested Fix
Modify the provider's request handling. Either find a copilot CLI flag that directs output to the specified temporary file, or change the callback logic to write the captured stdout data into the temporary file before _retrieve_response is called.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: lua/99/providers.lua#L334-L343
Potential issue: The `GitHubCopilotProvider` is configured to read the AI's response
from a temporary file. However, it invokes the `copilot` CLI with the `--prompt` flag,
which, according to its documentation, directs the output to `stdout`. The system
captures this `stdout` but never writes it to the temporary file that the
`_retrieve_response` function attempts to read. As a result, the temporary file remains
empty, causing the provider to return an empty response and rendering it completely
non-functional.
Did we get this right? 👍 / 👎 to inform future reviews.
|
i already do not to provide any more providers. just create the thing yourself and pass it in as the provider override. base provider is exposed |
GitHub Copilot Provider