From e44677327fb86a19fc0b21c6fe6a81d9e94ba107 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 12 May 2023 14:00:12 -0700 Subject: [PATCH] aider: Added a new argument --chat-history-file with a default value of .aider.chat.history.md. # Context: USER: add a new arg --chat-history-file arg which is similar to --input-history-file but has a default of .aider.chat.history.md ASSISTANT: To add the new argument `--chat-history-file`, you can add a new `parser.add_argument()` call in the `aider/main.py` file. Here's the change: ```python aider/main.py <<<<<<< ORIGINAL parser.add_argument( "--input-history-file", metavar="INPUT_HISTORY_FILE", default=os.environ.get(f"{env_prefix}INPUT_HISTORY_FILE", ".aider.input.history"), help=( "Specify the chat input history file (default: .aider.input.history," f" ${env_prefix}INPUT_HISTORY_FILE)" ), ) ======= parser.add_argument( "--input-history-file", metavar="INPUT_HISTORY_FILE", default=os.environ.get(f"{env_prefix}INPUT_HISTORY_FILE", ".aider.input.history"), help=( "Specify the chat input history file (default: .aider.input.history," f" ${env_prefix}INPUT_HISTORY_FILE)" ), ) parser.add_argument( "--chat-history-file", metavar="CHAT_HISTORY_FILE", default=os.environ.get(f"{env_prefix}CHAT_HISTORY_FILE", ".aider.chat.history.md"), help=( "Specify the chat history file (default: .aider.chat.history.md," f" ${env_prefix}CHAT_HISTORY_FILE)" ), ) >>>>>>> UPDATED ``` This will add the new `--chat-history-file` argument with a default value of `.aider.chat.history.md`. --- aider/main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aider/main.py b/aider/main.py index 78aa6e06f..07e51b675 100644 --- a/aider/main.py +++ b/aider/main.py @@ -27,6 +27,15 @@ def main(args=None): f" ${env_prefix}INPUT_HISTORY_FILE)" ), ) + parser.add_argument( + "--chat-history-file", + metavar="CHAT_HISTORY_FILE", + default=os.environ.get(f"{env_prefix}CHAT_HISTORY_FILE", ".aider.chat.history.md"), + help=( + "Specify the chat history file (default: .aider.chat.history.md," + f" ${env_prefix}CHAT_HISTORY_FILE)" + ), + ) parser.add_argument( "--model", metavar="MODEL",