Nutlope / aicommits

A CLI that writes your git commit messages for you with AI

Home Page:https://www.npmjs.com/package/aicommits

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optional `--hint` Argument for Enhanced AI-Generated Commit Messages

chenjiayi8 opened this issue · comments

Feature request

This --hint argument would allow users to provide a brief, high-level description or hint about the changes they have made in the commit. The AI would then leverage this hint to generate a more contextual and precise commit message.

For instance, a user could execute the following command:

aicommits --hint "Fix the bug of feature XYZ"

By using this hint, the AI would be able to craft a more descriptive and meaningful commit message, such as "Fixed the bug causing a null pointer exception in feature XYZ", which could greatly improve the understandability of the commit history.

Why?

Currently, the AI-generated commit messages, especially for refactoring, tend to be quite generic and lack the context of why certain changes were made. For instance, we often see messages like "Refactoring xxxx," but without a clear explanation as to why the refactoring was necessary.

Alternatives

No response

Additional context

No response

commented

Brilliant idea imo!

I also found it could help for conventional commits as I'd like to be able to specify the impacted component. Currently it sometimes does things like "fix(index): blabla" where I would prefer it to do "fix(projectA): blabla"

At that point, isn't it faster to write the commit message yourself?

At that point, isn't it faster to write the commit message yourself?

When we actually want to see "fix: xxx", it always generates "Refactoring xxx". In this case, we have to cancel and write the commit message ourselves.