aider: Added support for --no-auto-commit argument.

# Context:
USER: do the same for --no-auto-commit
ASSISTANT: To support `auto_commit: true` in the configuration file, you can add a `--auto-commit` argument with the `store_true` action. Here's how to modify the `aider/main.py` file:

```python
aider/main.py
<<<<<<< ORIGINAL
    parser.add_argument(
        "--no-auto-commits",
        action="store_false",
        dest="auto_commits",
        env_var=f"{env_prefix}AUTO_COMMITS",
        help="Disable auto commit of changes",
        default=True,
    )
=======
    parser.add_argument(
        "--auto-commit",
        action="store_true",
        default=True,
        help="Enable auto commit of changes (default: True)",
    )

    parser.add_argument(
        "--no-auto-commit",
        action="store_false",
        dest="auto_commit",
        env_var=f"{env_prefix}AUTO_COMMIT",
        help="Disable auto commit of changes",
    )
>>>>>>> UPDATED
```

Now, you can use `auto_commit: true` in your configuration file without any issues.
This commit is contained in:
Paul Gauthier 2023-05-26 16:31:01 -07:00
parent 69f591a194
commit 1761325eef

View file

@ -102,12 +102,18 @@ def main(args=None, input=None, output=None):
help="Apply the changes from the given file instead of running the chat (debug)",
)
parser.add_argument(
"--no-auto-commits",
action="store_false",
dest="auto_commits",
env_var=f"{env_prefix}AUTO_COMMITS",
help="Disable auto commit of changes",
"--auto-commit",
action="store_true",
default=True,
help="Enable auto commit of changes (default: True)",
)
parser.add_argument(
"--no-auto-commit",
action="store_false",
dest="auto_commit",
env_var=f"{env_prefix}AUTO_COMMIT",
help="Disable auto commit of changes",
)
parser.add_argument(
"--dry-run",