Update prompt to match Aider's
This commit is contained in:
parent
641eadb253
commit
0934c6ad8d
28
main.py
28
main.py
|
@ -52,18 +52,28 @@ def git_commit(message):
|
||||||
|
|
||||||
|
|
||||||
def generate_message(diff):
|
def generate_message(diff):
|
||||||
prompt = '''
|
prompt = '''You are an expert software engineer that generates concise, \
|
||||||
Write a ONE LINE git commit message for the following diff.
|
one-line Git commit messages based on the provided diffs.
|
||||||
Respond with only the commit message.
|
Review the provided context and diffs which are about to be committed to a git repo.
|
||||||
Do not include quotes.
|
Review the diffs carefully.
|
||||||
Do not include file extensions.
|
Generate a one-line commit message for those changes.
|
||||||
DO NOT just say "Update notes", "Add new notes", "Refactor notes", "Make documentation updates".
|
|
||||||
Tersely summarize how each note changed.
|
Ensure the commit message:
|
||||||
Write in imperitive tense.
|
- Is in the imperative mood (e.g., \"add feature\" not \"added feature\" or \"adding feature\").
|
||||||
\n\n==============\n\n'''
|
- Does not exceed one line
|
||||||
|
- DO NOT just say "Update notes", "Add new notes", "Refactor notes", "Make documentation updates".
|
||||||
|
- Tersely summarize how each note changed.
|
||||||
|
|
||||||
|
Reply only with the one-line commit message, without any additional text, explanations, or line breaks.
|
||||||
|
|
||||||
|
Reply only with the one-line commit message, without any additional text, explanations, \
|
||||||
|
or line breaks.
|
||||||
|
\n\n==============\n\nDiffs:\n\n'''
|
||||||
|
|
||||||
prompt += diff
|
prompt += diff
|
||||||
|
|
||||||
|
logging.debug('Using prompt:\n%s', prompt)
|
||||||
|
|
||||||
message = llama(prompt)
|
message = llama(prompt)
|
||||||
|
|
||||||
if not message:
|
if not message:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user