Improve Git diff handling and OpenAI API compatibility - #47
Merged
Merged
Conversation
OpenAI Compatibility: - Support `reasoning_content` and handle null/missing content. - Normalize base URLs to strip inconsistent prefixes. - Allow OpenAI usage without API keys on custom endpoints. - Implement flexible model ID matching and dynamic validation. Git Improvements: - Capture `stderr` and provide human-readable git errors. - Add unit tests for Xcode license and standard git failures. Provider: lmstudio google/gemma-4-12b-qat Tokens: prompt=7072, completion=2611, total=9683
- Refactor `--diff` to support stdin, commit hashes, and file paths. - Truncate large diffs at line boundaries to prevent LLM context overflows. - Add commit hash validation and specific Xcode license error reporting. - Synchronize CWD-modifying tests with a mutex. - Update documentation to clarify `--diff` flag usage. Provider: lmstudio google/gemma-4-12b-qat Tokens: prompt=6479, completion=2986, total=9465
- Create a named type for the branch diffs data structure to improve code readability. Provider: lmstudio google/gemma-4-12b-qat Tokens: prompt=434, completion=390, total=824
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
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.
Overview
This PR enhances the tool's interaction with Git operations and OpenAI-compatible providers. It focuses on making the
--diffcommand more versatile, ensuring large diffs do not overflow LLM context limits, and improving the compatibility of the OpenAI integration with diverse endpoints (such as LM Studio). Additionally, it improves the user experience by providing more descriptive error reporting for Git operations.Changes
--diffflag to accept stdin, commit hashes, and specific file paths.reasoning_contentand handled null/missing content values.stderrto provide human-readable Git error messages.Testing / Validation
Notes / Risks
PR message generated in 21.87s
Commits in this PR:
a5484b6nhance OpenAI compatibility and Git error reporting803375eEnhance diff handling and context limits9322e4cIntroduce type alias for branch diffs