From 1603ffa6c284dce28e56f56b237c73ae225aadce Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 11 Sep 2024 14:01:10 -0700 Subject: [PATCH] fix: Update sample.aider.conf.yml and args_formatter.py --- aider/args_formatter.py | 6 ++- aider/website/assets/sample.aider.conf.yml | 60 ++++++++++++---------- aider/website/docs/config/aider_conf.md | 60 ++++++++++++---------- 3 files changed, 71 insertions(+), 55 deletions(-) diff --git a/aider/args_formatter.py b/aider/args_formatter.py index f97cb433d..df8bfac39 100644 --- a/aider/args_formatter.py +++ b/aider/args_formatter.py @@ -144,8 +144,12 @@ class YamlHelpFormatter(argparse.HelpFormatter): if default: parts.append(f"#{switch}: {default}\n") + elif action.nargs in ("*", "+") or isinstance(action, argparse._AppendAction): + parts.append(f"#{switch}: xxx") + parts.append(f"## Specify multiple values like this:") + parts.append(f"#{switch}: [xxx,yyyy,zzz]\n") else: - parts.append(f"#{switch}:\n") + parts.append(f"#{switch}: xxx\n") ### # parts.append(str(action)) diff --git a/aider/website/assets/sample.aider.conf.yml b/aider/website/assets/sample.aider.conf.yml index c100ed0ed..9b9b46077 100644 --- a/aider/website/assets/sample.aider.conf.yml +++ b/aider/website/assets/sample.aider.conf.yml @@ -12,19 +12,19 @@ # options: ## show this help message and exit -#help: +#help: xxx ####### # Main: ## Specify the OpenAI API key -#openai-api-key: +#openai-api-key: xxx ## Specify the Anthropic API key -#anthropic-api-key: +#anthropic-api-key: xxx ## Specify the model to use for the main chat -#model: +#model: xxx ## Use claude-3-opus-20240229 model for the main chat #opus: false @@ -54,22 +54,22 @@ # Model Settings: ## List known models which match the (partial) MODEL name -#list-models: +#list-models: xxx ## Specify the api base url -#openai-api-base: +#openai-api-base: xxx ## Specify the api_type -#openai-api-type: +#openai-api-type: xxx ## Specify the api_version -#openai-api-version: +#openai-api-version: xxx ## Specify the deployment_id -#openai-api-deployment-id: +#openai-api-deployment-id: xxx ## Specify the OpenAI organization ID -#openai-organization-id: +#openai-organization-id: xxx ## Specify a file with aider model settings for unknown models #model-settings-file: .aider.model.settings.yml @@ -81,16 +81,16 @@ #verify-ssl: true ## Specify what edit format the LLM should use (default depends on model) -#edit-format: +#edit-format: xxx ## Specify the model to use for commit messages and chat history summarization (default depends on --model) -#weak-model: +#weak-model: xxx ## Only work with models that have meta-data available (default: True) #show-model-warnings: true ## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024) -#map-tokens: +#map-tokens: xxx ## Control how often the repo map is refreshed (default: auto) #map-refresh: auto @@ -105,7 +105,7 @@ #map-multiplier-no-files: true ## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens. -#max-chat-history-tokens: +#max-chat-history-tokens: xxx ## Specify the .env file to load (default: .env in git root) #env-file: .env @@ -123,7 +123,7 @@ #restore-chat-history: false ## Log the conversation with the LLM to this file (for example, .aider.llm.history) -#llm-history-file: +#llm-history-file: xxx ################## # Output Settings: @@ -144,7 +144,7 @@ #user-input-color: #00cc00 ## Set the color for tool output (default: None) -#tool-output-color: +#tool-output-color: xxx ## Set the color for tool error messages (default: #FF2222) #tool-error-color: #FF2222 @@ -198,7 +198,7 @@ #commit: false ## Specify a custom prompt for generating commit messages -#commit-prompt: +#commit-prompt: xxx ## Perform a dry run without modifying files (default: False) #dry-run: false @@ -210,13 +210,15 @@ #lint: false ## Specify lint commands to run for different languages, eg: "python: flake8 --select=..." (can be used multiple times) -#lint-cmd: +#lint-cmd: xxx +## Specify multiple values like this: +#lint-cmd: [xxx,yyyy,zzz] ## Enable/disable automatic linting after changes (default: True) #auto-lint: true ## Specify command to run tests -#test-cmd: +#test-cmd: xxx ## Enable/disable automatic testing after changes (default: False) #auto-test: false @@ -228,10 +230,14 @@ # Other Settings: ## specify a file to edit (can be used multiple times) -#file: +#file: xxx +## Specify multiple values like this: +#file: [xxx,yyyy,zzz] ## specify a read-only file (can be used multiple times) -#read: +#read: xxx +## Specify multiple values like this: +#read: [xxx,yyyy,zzz] ## Use VI editing mode in the terminal (default: False) #vim: false @@ -240,10 +246,10 @@ #voice-language: en ## Specify the language to use in the chat (default: None, uses system settings) -#chat-language: +#chat-language: xxx ## Show the version number and exit -#version: +#version: xxx ## Check for updates and return status in the exit code #just-check-update: false @@ -258,7 +264,7 @@ #upgrade: false ## Apply the changes from the given file instead of running the chat (debug) -#apply: +#apply: xxx ## Always say yes to every confirmation #yes: false @@ -276,16 +282,16 @@ #exit: false ## Specify a single message to send the LLM, process reply then exit (disables chat mode) -#message: +#message: xxx ## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode) -#message-file: +#message-file: xxx ## Specify the encoding for input and output (default: utf-8) #encoding: utf-8 ## Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory) -#config: +#config: xxx ## Run aider in your browser #gui: false diff --git a/aider/website/docs/config/aider_conf.md b/aider/website/docs/config/aider_conf.md index 6a2112d59..d906e11bd 100644 --- a/aider/website/docs/config/aider_conf.md +++ b/aider/website/docs/config/aider_conf.md @@ -60,19 +60,19 @@ cog.outl("```") # options: ## show this help message and exit -#help: +#help: xxx ####### # Main: ## Specify the OpenAI API key -#openai-api-key: +#openai-api-key: xxx ## Specify the Anthropic API key -#anthropic-api-key: +#anthropic-api-key: xxx ## Specify the model to use for the main chat -#model: +#model: xxx ## Use claude-3-opus-20240229 model for the main chat #opus: false @@ -102,22 +102,22 @@ cog.outl("```") # Model Settings: ## List known models which match the (partial) MODEL name -#list-models: +#list-models: xxx ## Specify the api base url -#openai-api-base: +#openai-api-base: xxx ## Specify the api_type -#openai-api-type: +#openai-api-type: xxx ## Specify the api_version -#openai-api-version: +#openai-api-version: xxx ## Specify the deployment_id -#openai-api-deployment-id: +#openai-api-deployment-id: xxx ## Specify the OpenAI organization ID -#openai-organization-id: +#openai-organization-id: xxx ## Specify a file with aider model settings for unknown models #model-settings-file: .aider.model.settings.yml @@ -129,16 +129,16 @@ cog.outl("```") #verify-ssl: true ## Specify what edit format the LLM should use (default depends on model) -#edit-format: +#edit-format: xxx ## Specify the model to use for commit messages and chat history summarization (default depends on --model) -#weak-model: +#weak-model: xxx ## Only work with models that have meta-data available (default: True) #show-model-warnings: true ## Suggested number of tokens to use for repo map, use 0 to disable (default: 1024) -#map-tokens: +#map-tokens: xxx ## Control how often the repo map is refreshed (default: auto) #map-refresh: auto @@ -153,7 +153,7 @@ cog.outl("```") #map-multiplier-no-files: true ## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens. -#max-chat-history-tokens: +#max-chat-history-tokens: xxx ## Specify the .env file to load (default: .env in git root) #env-file: .env @@ -171,7 +171,7 @@ cog.outl("```") #restore-chat-history: false ## Log the conversation with the LLM to this file (for example, .aider.llm.history) -#llm-history-file: +#llm-history-file: xxx ################## # Output Settings: @@ -192,7 +192,7 @@ cog.outl("```") #user-input-color: #00cc00 ## Set the color for tool output (default: None) -#tool-output-color: +#tool-output-color: xxx ## Set the color for tool error messages (default: #FF2222) #tool-error-color: #FF2222 @@ -246,7 +246,7 @@ cog.outl("```") #commit: false ## Specify a custom prompt for generating commit messages -#commit-prompt: +#commit-prompt: xxx ## Perform a dry run without modifying files (default: False) #dry-run: false @@ -258,13 +258,15 @@ cog.outl("```") #lint: false ## Specify lint commands to run for different languages, eg: "python: flake8 --select=..." (can be used multiple times) -#lint-cmd: +#lint-cmd: xxx +## Specify multiple values like this: +#lint-cmd: [xxx,yyyy,zzz] ## Enable/disable automatic linting after changes (default: True) #auto-lint: true ## Specify command to run tests -#test-cmd: +#test-cmd: xxx ## Enable/disable automatic testing after changes (default: False) #auto-test: false @@ -276,10 +278,14 @@ cog.outl("```") # Other Settings: ## specify a file to edit (can be used multiple times) -#file: +#file: xxx +## Specify multiple values like this: +#file: [xxx,yyyy,zzz] ## specify a read-only file (can be used multiple times) -#read: +#read: xxx +## Specify multiple values like this: +#read: [xxx,yyyy,zzz] ## Use VI editing mode in the terminal (default: False) #vim: false @@ -288,10 +294,10 @@ cog.outl("```") #voice-language: en ## Specify the language to use in the chat (default: None, uses system settings) -#chat-language: +#chat-language: xxx ## Show the version number and exit -#version: +#version: xxx ## Check for updates and return status in the exit code #just-check-update: false @@ -306,7 +312,7 @@ cog.outl("```") #upgrade: false ## Apply the changes from the given file instead of running the chat (debug) -#apply: +#apply: xxx ## Always say yes to every confirmation #yes: false @@ -324,16 +330,16 @@ cog.outl("```") #exit: false ## Specify a single message to send the LLM, process reply then exit (disables chat mode) -#message: +#message: xxx ## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode) -#message-file: +#message-file: xxx ## Specify the encoding for input and output (default: utf-8) #encoding: utf-8 ## Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory) -#config: +#config: xxx ## Run aider in your browser #gui: false