aider/aider
Paul Gauthier ddc97dacf8 aider: Set default values for input and chat history files to be in the git root directory if there is one, otherwise, use the current directory.
# Context:
USER: have the input and chat history files default to be located in the git root, if there is one
ASSISTANT: To change the default location of the input and chat history files to the git root, you need to modify the `aider/main.py` file. Update the default values for `--input-history-file` and `--chat-history-file` arguments.

Here's the change:

```python
aider/main.py
<<<<<<< ORIGINAL
    parser.add_argument(
        "--input-history-file",
        metavar="INPUT_HISTORY_FILE",
        env_var=f"{env_prefix}INPUT_HISTORY_FILE",
        default=".aider.input.history",
        help="Specify the chat input history file (default: .aider.input.history)",
    )
    parser.add_argument(
        "--chat-history-file",
        metavar="CHAT_HISTORY_FILE",
        env_var=f"{env_prefix}CHAT_HISTORY_FILE",
        default=".aider.chat.history.md",
        help="Specify the chat history file (default: .aider.chat.history.md)",
    )
=======
    default_input_history_file = os.path.join(git_root, ".aider.input.history") if git_root else ".aider.input.history"
    default_chat_history_file = os.path.join(git_root, ".aider.chat.history.md") if git_root else ".aider.chat.history.md"

    parser.add_argument(
        "--input-history-file",
        metavar="INPUT_HISTORY_FILE",
        env_var=f"{env_prefix}INPUT_HISTORY_FILE",
        default=default_input_history_file,
        help=f"Specify the chat input history file (default: {default_input_history_file})",
    )
    parser.add_argument(
        "--chat-history-file",
        metavar="CHAT_HISTORY_FILE",
        env_var=f"{env_prefix}CHAT_HISTORY_FILE",
        default=default_chat_history_file,
        help=f"Specify the chat history file (default: {default_chat_history_file})",
    )
>>>>>>> UPDATED
```

This change sets the default values for the input and chat history files to be in the git root directory if there is one, otherwise, it will use the current directory.
2023-05-26 16:22:49 -07:00
..
__init__.py initial 2023-05-09 11:00:32 -07:00
coder.py advertise /exit 2023-05-26 16:09:40 -07:00
commands.py cleaned up /exit, normalized /help 2023-05-26 12:21:43 -07:00
dump.py black formatting 2023-05-17 18:24:35 -07:00
io.py aider: Updated default values of pretty and yes to True and False respectively in the InputOutput class constructor. 2023-05-23 06:05:48 -07:00
main.py aider: Set default values for input and chat history files to be in the git root directory if there is one, otherwise, use the current directory. 2023-05-26 16:22:49 -07:00
prompts.py Stronger prompting to only modify full files, not parts of the repo map 2023-05-26 12:59:08 -07:00
repomap.py enable ctags if present 2023-05-26 16:03:24 -07:00
utils.py Refactor show_messages function to accept an optional title parameter and remove unused code. 2023-05-19 10:57:24 -07:00