refactor: Rename user-submitted-input-color to user-input-submitted-color

This commit is contained in:
Matteo Landi (aider) 2025-05-18 16:23:11 +02:00
parent 40d278771a
commit a26ab12b2c
5 changed files with 12 additions and 12 deletions

View file

@ -328,7 +328,7 @@ def get_parser(default_config_files, git_root):
help="Set the color for user input (default: #00cc00)", help="Set the color for user input (default: #00cc00)",
) )
group.add_argument( group.add_argument(
"--user-submitted-input-color", "--user-input-submitted-color",
default=None, default=None,
help="Set the color for user submitted input (default: #00cc00)", help="Set the color for user submitted input (default: #00cc00)",
) )

View file

@ -243,7 +243,7 @@ class InputOutput:
input=None, input=None,
output=None, output=None,
user_input_color="blue", user_input_color="blue",
user_submitted_input_color=None, user_input_submitted_color=None,
tool_output_color=None, tool_output_color=None,
tool_error_color="red", tool_error_color="red",
tool_warning_color="#FFA500", tool_warning_color="#FFA500",
@ -282,8 +282,8 @@ class InputOutput:
pretty = False pretty = False
self.user_input_color = ensure_hash_prefix(user_input_color) if pretty else None self.user_input_color = ensure_hash_prefix(user_input_color) if pretty else None
self.user_submitted_input_color = ( self.user_input_submitted_color = (
ensure_hash_prefix(user_submitted_input_color) if pretty else None ensure_hash_prefix(user_input_submitted_color) if pretty else None
) )
self.tool_output_color = ensure_hash_prefix(tool_output_color) if pretty else None self.tool_output_color = ensure_hash_prefix(tool_output_color) if pretty else None
self.tool_error_color = ensure_hash_prefix(tool_error_color) if pretty else None self.tool_error_color = ensure_hash_prefix(tool_error_color) if pretty else None
@ -374,7 +374,7 @@ class InputOutput:
"""Validate configured color strings and reset invalid ones.""" """Validate configured color strings and reset invalid ones."""
color_attributes = [ color_attributes = [
"user_input_color", "user_input_color",
"user_submitted_input_color", "user_input_submitted_color",
"tool_output_color", "tool_output_color",
"tool_error_color", "tool_error_color",
"tool_warning_color", "tool_warning_color",
@ -759,8 +759,8 @@ class InputOutput:
log_file.write(content + "\n") log_file.write(content + "\n")
def display_user_input(self, inp): def display_user_input(self, inp):
if self.pretty and self.user_submitted_input_color: if self.pretty and self.user_input_submitted_color:
style = dict(style=self.user_submitted_input_color) style = dict(style=self.user_input_submitted_color)
else: else:
style = dict() style = dict()

View file

@ -557,7 +557,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
input=input, input=input,
output=output, output=output,
user_input_color=args.user_input_color, user_input_color=args.user_input_color,
user_submitted_input_color=args.user_submitted_input_color, user_input_submitted_color=args.user_input_submitted_color,
tool_output_color=args.tool_output_color, tool_output_color=args.tool_output_color,
tool_warning_color=args.tool_warning_color, tool_warning_color=args.tool_warning_color,
tool_error_color=args.tool_error_color, tool_error_color=args.tool_error_color,

View file

@ -173,8 +173,8 @@
## Set the color for user input (default: #00cc00) ## Set the color for user input (default: #00cc00)
#user-input-color: "#00cc00" #user-input-color: "#00cc00"
## Set the color for user submitted input (default: None) ## Set the color for user submitted input (default: #00cc00)
#user-submitted-input-color: "#00cc00" #user-input-submitted-color: "#00cc00"
## Set the color for tool output (default: None) ## Set the color for tool output (default: None)
#tool-output-color: "xxx" #tool-output-color: "xxx"

View file

@ -202,8 +202,8 @@ cog.outl("```")
## Set the color for user input (default: #00cc00) ## Set the color for user input (default: #00cc00)
#AIDER_USER_INPUT_COLOR=#00cc00 #AIDER_USER_INPUT_COLOR=#00cc00
## Set the color for user submitted input (default: None) ## Set the color for user submitted input (default: #00cc00)
#AIDER_USER_SUBMITTED_INPUT_COLOR= #AIDER_USER_INPUT_SUBMITTED_COLOR=
## Set the color for tool output (default: None) ## Set the color for tool output (default: None)
#AIDER_TOOL_OUTPUT_COLOR= #AIDER_TOOL_OUTPUT_COLOR=