feat(clink): add GitHub Copilot CLI integration#413
feat(clink): add GitHub Copilot CLI integration#413TejGandham wants to merge 4 commits intoBeehiveInnovations:mainfrom
Conversation
Add Copilot as a supported CLI agent for clink, enabling multi-model collaboration through GitHub Copilot's CLI at $10/mo subscription cost. - CopilotAgent: passes prompt via -p flag, uses DEVNULL stdin - CopilotJSONLParser: parses JSONL output (assistant.message + result events) - CLI client config with --allow-all-tools and default/planner/codereviewer roles - Internal defaults with copilot_jsonl parser and --output-format json Includes 12 unit tests covering parser and agent behavior. Closes BeehiveInnovations#406
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces native support for the GitHub Copilot CLI within the clink framework. By integrating Copilot as a new agent, it expands the system's capabilities for multi-model collaboration, allowing users to leverage Copilot's AI functionalities directly. The changes involve adding a dedicated agent and parser, along with necessary configuration, to seamlessly execute and interpret responses from the Copilot CLI. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for the GitHub Copilot CLI, including a new agent, a JSONL parser, and corresponding configuration and tests. However, it introduces two security concerns: the use of the --allow-all-tools flag, which increases the risk of prompt injection leading to unauthorized tool execution, and the logging of user prompts, which may contain sensitive information. Additionally, there is a maintainability concern regarding code duplication between the new CopilotAgent and the BaseCLIAgent.
Reformat 10 test files that were formatted with Python 3.13 syntax which Black on Python 3.11 (used in CI) cannot parse.
- Remove --allow-all-tools from default config to prevent unauthorized tool execution via prompt injection; users can opt-in explicitly - Redact prompt content (-p argument) from debug logs to avoid leaking PII or credentials
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5df43eb61b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The -p prompt value was flowing through sanitized_command into AgentOutput metadata and tool output, leaking conversation history and sensitive user text. Now redacted at the source so both logs and metadata contain [REDACTED] instead of the actual prompt.
Summary
CopilotAgent(prompt via-pflag, DEVNULL stdin) andCopilotJSONLParser(parsesassistant.message+resultJSONL events)conf/cli_clients/copilot.json) and default/planner/codereviewer rolesTest plan
-pflag verification, DEVNULL stdin, error recovery, unparseable output, executable-not-foundtest_registry_lists_rolesunrelated to this change)copilotCLI installed locallyCloses #406