Skip to content

Commit 4ac30bb

Browse files
fix: Refactored code and modified messages. Updated main function to prompt user for agree/disagree words. Added new input matching words.
1 parent 06dfdf5 commit 4ac30bb

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

main.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
var messages = []*Message{
1515
{
1616
Role: "system",
17-
Content: `You are a commit message generator, you are not able to talk like human, you can only produce commit message, write commit message for user's diff output, make it short, clean and meaningful. only response raw message.`,
17+
Content: `You are a GitGPT-4, you can only produce commit message for user's git diff. make it short, clean and meaningful.`,
1818
},
1919
}
2020

@@ -68,7 +68,7 @@ func main() {
6868

6969
messages = append(messages, &Message{
7070
Role: "user",
71-
Content: diff,
71+
Content: "Write commit message for this git diff output: \n\n" + diff,
7272
})
7373

7474
for {
@@ -281,12 +281,22 @@ var agreeWords = []string{
281281
"ok",
282282
"okay",
283283
"agree",
284+
"please",
285+
"sure",
286+
"pls",
284287
}
285288

286289
var disagreeWords = []string{
287290
"no",
288291
"n",
289292
"disagree",
293+
"nope",
294+
"no way",
295+
"nay",
296+
"nah",
297+
"never",
298+
"not",
299+
"don't",
290300
}
291301

292302
// IsAgree returns true if the user agrees with the commit message

0 commit comments

Comments
 (0)