-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/commit more changes #37
base: main
Are you sure you want to change the base?
Feature/commit more changes #37
Conversation
- Add `gpt-3-encoder` import and define `MAX_TOKENS` in `index.js` - Implement `parseDiffByFile` function to handle large diffs - Modify `generateAICommit` to manage diffs exceeding `MAX_TOKENS`, with user confirmations - Refactor `sendMessage` in `openai.js` for improved readability - Update prompts in commit generation functions for clarity - Add `getPromptForDiffSummary` method to summarize git diffs per file - Decrease `MAX_TOKENS` in `openai.js` from 128k to 4k with adjustable note
ready for review |
…limits in openai.js
33f26ed
to
4bdfb7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for your work and improvements.
Comments need to be changed, they are not in English. And also, I am not sure that it is necessary to support large commits. It is bad practice to commit everything in one commit, it is desirable to avoid it.
It seems that if you analyze each file separately, and then all together, then you will greatly spoil the speed of the solution. I use openai gpt-4o and do not encounter problems with the model not detecting files well, here is an example
It would be cool to see visible changes in the speed of prompts (benchmarks) and visual examples of improvements in the fact that analysis through files improves the final result (same files with 2 different versions)
It seems that without this it is not worth merge it in
- Replace French comments with their English equivalents in `index.js`. - Clarify the functionality of code blocks with updated comments in both `index.js` and `openai.js`. - Introduce a new function description for generating prompts from diffs in `openai.js`.
Hello, I understand your concerns about the speed of generating commit messages and the potential impact on performance. However, I want to reassure you that my proposal should not be directly compared to the current version. Here's why: Context of the Split Method
Advantages of the Split Method
Why is this Method Useful?
Reflection on Commit PracticesIt's true that making commits with too many changes is a bad practice. However, this method allows us to cover a broader range of developers and manage various commit situations. If it takes a bit longer, it's often due to users employing less optimal commit methods. In conclusion, this approach aims to offer additional flexibility without impacting those who don't need it. I am convinced that this solution can enrich our tool and meet the needs of many users. Thank you for your consideration. 😊 |
🚀 Proposal: Enhanced Commit Message Generation for Large Projects 🌟
Description
As a contributor to this project, I'm excited to propose an update to the commit message generation system. This enhancement will significantly improve how we document changes in large-scale projects.
New Features :
Methodology :
Advantages :
Technical Changes
parseDiffByFile
Function : Allows dividing the global diff into per-file diffs.openai.js
andindex.js
: Integrates logic for per-file summarization and adjusts API calls.Impact
This update will significantly improve how we document changes in our project, especially for larger pull requests. It ensures that every modification is correctly captured and integrated into the Git history.
Thank you for considering this proposal! I believe this enhancement will greatly benefit our development workflow and contribute to better code documentation.
Feel free to ask any questions or suggest improvements. I'm eager to hear your thoughts! 🤔