mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
![]() # 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. |
||
---|---|---|
.. | ||
__init__.py | ||
coder.py | ||
commands.py | ||
dump.py | ||
io.py | ||
main.py | ||
prompts.py | ||
repomap.py | ||
utils.py |