mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
aider: Added completions_height
parameter to InputOutput
class and passed it from aider/main.py
.
# Context: USER: pass it to `InputOutput` and store as a self. var ASSISTANT: I will modify the `InputOutput` class in `aider/io.py` to accept the `completions_height` parameter and store it as an instance variable. Here's the change to add the `completions_height` parameter to the `InputOutput` class: ```python aider/io.py ^C KeyboardInterrupt USER: `aider/io.py` ASSISTANT: I will modify the `InputOutput` class in `aider/io.py` to accept the `completions_height` parameter and store it as an instance variable. Here's the change to add the `completions_height` parameter to the `InputOutput` class: ```python aider/io.py <<<<<<< ORIGINAL def __init__( self, pretty=True, yes=False, input_history_file=None, chat_history_file=None, input=None, output=None, user_input_color="blue", tool_output_color=None, tool_error_color="red", ): ======= def __init__( self, pretty=True, yes=False, input_history_file=None, chat_history_file=None, input=None, output=None, user_input_color="blue", tool_output_color=None, tool_error_color="red", completions_height=10, ): self.completions_height = completions_height >>>>>>> UPDATED ``` Now, you need to pass the `completions_height` value from `aider/main.py` to the `InputOutput` class when creating an instance: ```python aider/main.py <<<<<<< ORIGINAL io = InputOutput( args.pretty, args.yes, args.input_history_file, args.chat_history_file, input=input, output=output, user_input_color=args.user_input_color, tool_output_color=args.tool_output_color, tool_error_color=args.tool_error_color, ) ======= io = InputOutput( args.pretty, args.yes, args.input_history_file, args.chat_history_file, input=input, output=output, user_input_color=args.user_input_color, tool_output_color=args.tool_output_color, tool_error_color=args.tool_error_color, completions_height=args.completions_height, ) >>>>>>> UPDATED ``` Now, the `completions_height` value is passed to the `InputOutput` class and stored as an instance variable.
This commit is contained in:
parent
c9ebbdf0c0
commit
a4e57e17b5
2 changed files with 3 additions and 0 deletions
|
@ -88,7 +88,9 @@ class InputOutput:
|
||||||
user_input_color="blue",
|
user_input_color="blue",
|
||||||
tool_output_color=None,
|
tool_output_color=None,
|
||||||
tool_error_color="red",
|
tool_error_color="red",
|
||||||
|
completions_height=10,
|
||||||
):
|
):
|
||||||
|
self.completions_height = completions_height
|
||||||
no_color = os.environ.get("NO_COLOR")
|
no_color = os.environ.get("NO_COLOR")
|
||||||
if no_color is not None and no_color != "":
|
if no_color is not None and no_color != "":
|
||||||
pretty = False
|
pretty = False
|
||||||
|
|
|
@ -205,6 +205,7 @@ def main(args=None, input=None, output=None):
|
||||||
user_input_color=args.user_input_color,
|
user_input_color=args.user_input_color,
|
||||||
tool_output_color=args.tool_output_color,
|
tool_output_color=args.tool_output_color,
|
||||||
tool_error_color=args.tool_error_color,
|
tool_error_color=args.tool_error_color,
|
||||||
|
completions_height=args.completions_height,
|
||||||
)
|
)
|
||||||
|
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue