Skip to content
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

Specify the type of commit or input key words #128

Open
xuwei152 opened this issue May 8, 2024 · 4 comments
Open

Specify the type of commit or input key words #128

xuwei152 opened this issue May 8, 2024 · 4 comments
Assignees

Comments

@xuwei152
Copy link

xuwei152 commented May 8, 2024

Is your feature request related to a problem? Please describe.

Many of the AI's commit messages are incorrect, even for the type.

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Describe the solution you'd like

Is it possible to specify the type of commit message or key words to help Ai to generate the commit message more accurately?

Copy link

@guanguans
Copy link
Owner

@xuwei152 You can try to configure a customized prompt.

/your home directory/.ai-commit/.ai-commit.json or current working directory/.ai-commit.json

{
    ...
    "prompt": "custom",
    "prompts": {
        "conventional": "Here are some best practices...",
        "custom": "..."
    }
}

@xuwei152
Copy link
Author

xuwei152 commented May 8, 2024

I mean feed the "type" to the AI in the prompt like the "no" to correct the generated message.

For example, the commit message shown below has a type of "refactor" but it is a type of "chore", actually. I hope to input the type "chore" to tell the AI to generate a message with a type of "chore", instead of typing "no" again and again and getting incorrect messages. Something likes chatting with the Ai bot to correct the answer. I don't think this can be achieved by configuring ".ai-commit.json".

Clip_2024-05-08_13-33-04

There may be an easier way. You can add an option of "--commit-type" like insulineru/ai-commit.

Clip_2024-05-08_14-06-24

@guanguans
Copy link
Owner

@xuwei152 It's really a good idea, but I don't have time to realize it. You can realize your idea and then PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants