-
Notifications
You must be signed in to change notification settings - Fork 396
Feat/add user input code context #420
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
Feat/add user input code context #420
Conversation
* feat(config): add support for groq AI provider, including config validation and engine implementation (di-sukharev#381) * fix migrations (di-sukharev#414) --------- Co-authored-by: Takanori Matsumoto <matscube@gmail.com> Co-authored-by: BILLY Maxime <ozeliurs@gmail.com>
…y name for consistency and clarity
…y name for consistency and clarity
|
thats awesome, reading |
di-sukharev
left a comment
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.
great, left few comments
src/prompts.ts
Outdated
| * @returns - The context of the user input | ||
| */ | ||
| const userInputCodeContext = () => { | ||
| const args = process.argv; |
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.
i think this function should accept an argument context: string, wdyt?
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.
To implement this in a more effective manner, I switched to a flag called context. This approach makes the code more declarative and self-explanatory. Users can learn about this feature by running the oco --help command, which provides detailed information on how to use the context flag and its purpose within the application
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.
Check again when you can
|
|
||
| export async function commit( | ||
| extraArgs: string[] = [], | ||
| context: string = '', |
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.
exactly
|
nice job, i will be merging tmr |
Enhance Context Awareness for Commit Message Generation
OpenCommit now allows you to provide additional context when generating commit messages. This context is incorporated into the prompt given to the AI model, enabling it to create more tailored and relevant commit messages.
Usage
To provide additional context, use the
--contextflag followed by your context in quotes after the OpenCommit command:The AI model will consider the provided context when generating the commit message, incorporating relevant information when appropriate.
Benefits
This enhancement strengthens OpenCommit's ability to generate meaningful and accurate commit messages, facilitating better commit history management and code collaboration.