Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 6e6d301

Browse files
committed
feat(prompt): update default prompt for commit message
The default prompt for commit message generation has been updated to follow the conventional commit convention and provide clearer instructions. This change will improve the quality of commit messages and help maintain a clean commit history.
1 parent 5f3adf8 commit 6e6d301

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin/settings

src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin/settings/AppSettings.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ class AppSettings : PersistentStateComponent<AppSettings> {
2222
private val openAITokenTitle = "OpenAIToken"
2323
private val openAIPromptTitle = "OpenAIPrompt"
2424

25-
private var defaultPrompt = "As a professional developer working with a Git repository, it's important to maintain clear and concise commit messages that follow the standard format. Please create a commit message for the following changes: {diffs}. Remember to label everything logically and keep it short. Please use the following format <type>(<scope>): <short> \n\n [...]'. And here's a helpful hint from another developer: {hint}. Maybe you can use it to help you write your commit message."
25+
private var defaultPrompt = "Write a git commit message. " +
26+
"Use the conventional commit convention and follow best practices to maintain clear and concise commit messages. " +
27+
"The format have to be 'type(scope): short' and should not exceed 74 characters.\n" +
28+
"Generate a meaningful commit message for the given changes in '''{diffs}'''. " +
29+
"Please describe the changes briefly and why they were made in the present tense.\n" +
30+
"If available, use the hints provided by the user in '''{hint}''' to help you write the commit message.\n" +
31+
"Remember, do not preface the commit with anything and add a short description of why the commit was done after the commit message."
2632

2733
var requestSupport = true
2834

0 commit comments

Comments
 (0)