0

Change language of generated commit messages

auchri 2 days ago updated by Daniel Siegl 2 days ago 4

I want to configure the language of the AI generated commit messages

Commit dialog

Hi,
Good input!
For now, it should be possible using a custom prompt!
Cheers
Daniel

+1

Here is a sample configuration:

Modify following entry in your .smartgit-ai configuration in your home directory (user profile on Windows)

[smartgit-ai-commit-message "generate"]
  llm = openai-generic
  maxDiffSize = 32768
  promptFile = .smartgit-ai-generate-message

And create .smartgit-ai-generate-message next to it with a content like:

Write a concise, one-line commit message (max 70 characters) for the following Git Diff.
Do not add prefixes like "fix:" or "feat:".
Respond in German.

Git Diff:

${gitDiff}

+1

Hi Daniel and Marc, thank you for the sample, it works!

But still I would prefer to change the language in the UI :)