From 4dfdddf0d9892f3b1e1cdef734c289891c878938 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 31 Jul 2024 09:46:13 -0300 Subject: [PATCH] feat: add --commit-prompt switch The new `--commit-prompt` switch allows users to specify a custom prompt for generating commit messages. This feature is implemented by adding the new argument to the argument parser in `aider/args.py` and passing it to the `Coder.create` method in `aider/main.py`. --- aider/args.py | 5 +++++ aider/main.py | 1 + 2 files changed, 6 insertions(+) diff --git a/aider/args.py b/aider/args.py index d7f3475e8..307eb7f6e 100644 --- a/aider/args.py +++ b/aider/args.py @@ -352,6 +352,11 @@ def get_parser(default_config_files, git_root): default=False, help="Prefix commit messages with 'aider: ' (default: False)", ) + group.add_argument( + "--commit-prompt", + metavar="PROMPT", + help="Specify a custom prompt for generating commit messages", + ) group.add_argument( "--dry-run", action=argparse.BooleanOptionalAction, diff --git a/aider/main.py b/aider/main.py index 75ea3e49b..75b9eae54 100644 --- a/aider/main.py +++ b/aider/main.py @@ -490,6 +490,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F attribute_committer=args.attribute_committer, attribute_commit_message=args.attribute_commit_message, verify_ssl=args.verify_ssl, + commit_prompt=args.commit_prompt, ) except ValueError as err: