You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// getDefaultPromptConfig returns the default prompt configuration
70
86
funcgetDefaultPromptConfig() *PromptConfig {
71
87
return&PromptConfig{
72
88
SystemMessage: "You are a helpful assistant that generates git commit messages, and pull request titles.",
73
89
CommitMessageTemplate: "Based on the following git diff, generate 10 conventional commit messages. Each message should be on a new line, without any numbering or bullet points:\n\n%s",
74
90
PRTitleTemplate: "Based on the following git diff, generate 10 pull request title suggestions. Each title should be on a new line, without any numbering or bullet points:\n\n%s",
91
+
Language: "English",
75
92
}
76
93
}
77
94
78
-
// savePromptConfig saves the prompt configuration to a file
basePrompt=fmt.Sprintf("Based on the following git diff, generate 10 conventional commit messages. Each message should be on a new line, without any numbering or bullet points:\n\n%s", diff)
119
138
}
120
139
121
-
// Add language instruction based on configuration
122
-
language:=config.Language
123
-
iflanguage=="" {
124
-
language=GetLanguage()
125
-
}
126
-
127
-
iflanguage=="es" {
128
-
basePrompt+="\n\nIMPORTANT: Generate all commit messages in Spanish."
129
-
} elseiflanguage=="en" {
130
-
basePrompt+="\n\nIMPORTANT: Generate all commit messages in English."
basePrompt=fmt.Sprintf("Based on the following git diff, generate 10 pull request title suggestions. Each title should be on a new line, without any numbering or bullet points:\n\n%s", diff)
returnfmt.Sprintf("Based on the following git diff, generate 10 pull request title suggestions. Each title should be on a new line, without any numbering or bullet points:\n\n%s", diff)
0 commit comments