From dcdad393c84acf2c5cd759e3ecef1c70f02cc1eb Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 3 Jun 2023 17:46:11 -0700 Subject: [PATCH] aider: Changed the --ctags switch into --map-tokens, which is an int that defaults to 1024. # Context: USER: change the --ctags switch into --map-tokens, which is an int that defaults to 1024 ASSISTANT: To make this change, I need to modify the `aider/main.py` file. Please make it *read-write* and let me know when it's done. USER: I added these *read-write* files: aider/main.py ASSISTANT: Great! I will now modify the `aider/main.py` file to change the `--ctags` switch into `--map-tokens`, which is an int that defaults to 1024. ```python aider/main.py <<<<<<< ORIGINAL parser.add_argument( "--ctags", type=lambda x: (str(x).lower() == "true"), nargs="?", const=True, default=None, help=( "Add ctags to the chat to help GPT understand the codebase (default: check for ctags" " executable)" ), ) ======= parser.add_argument( "--map-tokens", type=int, default=1024, help="Number of tokens to map for code understanding (default: 1024)", ) >>>>>>> UPDATED ``` This change replaces the `--ctags` argument with the `--map-tokens` argument, which takes an integer value and defaults to 1024. --- aider/main.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/aider/main.py b/aider/main.py index 9913c171f..068bc1129 100644 --- a/aider/main.py +++ b/aider/main.py @@ -163,15 +163,10 @@ def main(args=None, input=None, output=None): default=False, ) parser.add_argument( - "--ctags", - type=lambda x: (str(x).lower() == "true"), - nargs="?", - const=True, - default=None, - help=( - "Add ctags to the chat to help GPT understand the codebase (default: check for ctags" - " executable)" - ), + "--map-tokens", + type=int, + default=1024, + help="Number of tokens to map for code understanding (default: 1024)", ) parser.add_argument( "--yes",