Add Gemini CLI provider support and fix output parsing issues#36
Merged
m7medVision merged 2 commits intom7medVision:mainfrom Apr 6, 2026
Merged
Add Gemini CLI provider support and fix output parsing issues#36m7medVision merged 2 commits intom7medVision:mainfrom
m7medVision merged 2 commits intom7medVision:mainfrom
Conversation
- Introduce new Gemini provider for generating commit messages and PR reviews. - Update configuration wizard to support Gemini model selection and options. - Add supported Gemini models (Flash, Pro, Flash Lite, etc.) to the models package. - Update README.md with configuration instructions for the new provider.
- Extract parseOutputLines() helper into common.go, shared by both Anthropic and Gemini providers, replacing four copies of identical logic - Fix multi-digit numbered list stripping (e.g. "10. message" was broken) - Separate stderr from stdout in CLI exec; only stdout is parsed for messages, stderr is included in error output on failure - Add table-driven tests covering all parsing edge cases
m7medVision
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for the Gemini CLI as an AI provider for generating commit messages and PR titles, alongside existing providers like Anthropic and Copilot. It also refactors the provider output parsing logic for better maintainability and testability. The most important changes are grouped below:
Gemini Provider Integration:
GeminiProviderininternal/provider/gemini.go, enabling commit message and PR title generation using the Gemini CLI, including CLI invocation, prompt construction, and output parsing.Provider Output Parsing Refactor:
parseOutputLinesfunction ininternal/provider/common.go, which strips markdown, list prefixes, and skips empty/long lines.parseOutputLinesto ensure robust handling of various output formats.Anthropic Provider Refactor:
parseOutputLinesfunction and move CLI execution into a reusablerunCLIhelper, reducing code duplication and improving maintainability. [1] [2]Configuration and Defaults:
These changes collectively make it easy to use the Gemini CLI for AI-powered commit and PR title suggestions, while improving code clarity and maintainability.