From 5e9a4e01f9abe60b46d371a5ff7bd544102dd5c3 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 23 Sep 2024 09:04:46 -0700 Subject: [PATCH] feat: Move map-tokens, map-refresh and map-multiplier into a new Repomap Setting section --- aider/args.py | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/aider/args.py b/aider/args.py index e1661c282..ad8d17c7f 100644 --- a/aider/args.py +++ b/aider/args.py @@ -196,21 +196,6 @@ def get_parser(default_config_files, git_root): default=True, help="Only work with models that have meta-data available (default: True)", ) - group.add_argument( - "--map-tokens", - type=int, - default=None, - help="Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)", - ) - group.add_argument( - "--map-refresh", - choices=["auto", "always", "files", "manual"], - default="auto", - help=( - "Control how often the repo map is refreshed. Options: auto, always, files, manual" - " (default: auto)" - ), - ) group.add_argument( "--cache-prompts", action=argparse.BooleanOptionalAction, @@ -223,12 +208,6 @@ def get_parser(default_config_files, git_root): default=0, help="Number of times to ping at 5min intervals to keep prompt cache warm (default: 0)", ) - group.add_argument( - "--map-multiplier-no-files", - type=float, - default=2, - help="Multiplier for map tokens when no files are specified (default: 2)", - ) group.add_argument( "--max-chat-history-tokens", type=int, @@ -247,6 +226,30 @@ def get_parser(default_config_files, git_root): help="Specify the .env file to load (default: .env in git root)", ) + ########## + group = parser.add_argument_group("Repomap Settings") + group.add_argument( + "--map-tokens", + type=int, + default=None, + help="Suggested number of tokens to use for repo map, use 0 to disable (default: 1024)", + ) + group.add_argument( + "--map-refresh", + choices=["auto", "always", "files", "manual"], + default="auto", + help=( + "Control how often the repo map is refreshed. Options: auto, always, files, manual" + " (default: auto)" + ), + ) + group.add_argument( + "--map-multiplier-no-files", + type=float, + default=2, + help="Multiplier for map tokens when no files are specified (default: 2)", + ) + ########## group = parser.add_argument_group("History Files") default_input_history_file = (