mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
remove all hr / --- from chat transcripts
This commit is contained in:
parent
b95015c25b
commit
93433398ac
5 changed files with 0 additions and 26 deletions
|
@ -106,7 +106,6 @@ These changes will replace the usage of `/dev/null` with `prompt_toolkit`'s inpu
|
|||
> Applied edit to tests/test_main.py
|
||||
> Commit c177e29 aider: Replaced usage of /dev/null with prompt_toolkit's input mocking functions in tests.
|
||||
|
||||
---
|
||||
|
||||
> Git repo has uncommitted changes.
|
||||
> Suggested commit message:
|
||||
|
@ -114,13 +113,11 @@ These changes will replace the usage of `/dev/null` with `prompt_toolkit`'s inpu
|
|||
> Commit before the chat proceeds [y/n/commit message]? y
|
||||
> Commit 6724fcd Added import statement for sys module in test_main.py.
|
||||
|
||||
---
|
||||
|
||||
#### /add aider/main.py
|
||||
|
||||
> Added aider/main.py to the chat
|
||||
|
||||
---
|
||||
|
||||
#### I am getting this error: FAILED tests/test_main.py::TestMain::test_main_with_empty_git_dir_new_file - TypeError: main() got an unexpected keyword argument 'input'
|
||||
|
||||
|
@ -148,7 +145,6 @@ Now, the `main()` function will accept the `input` and `output` keyword argument
|
|||
> Applied edit to aider/main.py
|
||||
> Commit 79dfba9 aider: Fixed main() function to accept input and output keyword arguments.
|
||||
|
||||
---
|
||||
#### we need to pass those into InputOutput and to prompt_toolkit right?
|
||||
|
||||
Yes, you're right. We need to pass the `input` and `output` arguments to the `InputOutput` class and then to the `prompt_toolkit.prompt()` function. Here's how to modify the `aider/getinput.py` and `aider/main.py` files:
|
||||
|
@ -213,7 +209,6 @@ These changes will ensure that the `input` and `output` arguments are passed to
|
|||
> Applied edit to aider/main.py
|
||||
> Commit cea9d2a aider: Updated InputOutput class to accept input and output arguments and passed them to prompt_toolkit.prompt() function.
|
||||
|
||||
---
|
||||
#### FAILED tests/test_main.py::TestMain::test_main_with_empty_git_dir_new_file - TypeError: prompt() got an unexpected keyword argument 'input'
|
||||
|
||||
I apologize for the confusion. It seems I made a mistake in the `prompt_toolkit.prompt()` function call. The `prompt()` function accepts `stdin` and `stdout` arguments instead of `input` and `output`. Here's the fix:
|
||||
|
@ -236,7 +231,6 @@ These changes will ensure that the `input` and `output` arguments are passed cor
|
|||
> Applied edit to aider/getinput.py
|
||||
> Commit 55d3540 aider: Fixed `prompt()` function call in `get_input()` method to pass `stdin` and `stdout` arguments instead of `input` and `output`.
|
||||
|
||||
---
|
||||
#### prompt_toolkit.shortcuts.prompt(message: AnyFormattedText | None = None, *, history: History | None = None, editing_mode: EditingMode | None = None, refresh_interval: float | None = None, vi_mode: bool | None = None, lexer: Lexer | None = None, completer: Completer | None = None, complete_in_thread: bool | None = None, is_password: bool | None = None, key_bindings: KeyBindingsBase | None = None, bottom_toolbar: AnyFormattedText | None = None, style: BaseStyle | None = None, color_depth: ColorDepth | None = None, cursor: AnyCursorShapeConfig = None, include_default_pygments_style: FilterOrBool | None = None, style_transformation: StyleTransformation | None = None, swap_light_and_dark_colors: FilterOrBool | None = None, rprompt: AnyFormattedText | None = None, multiline: FilterOrBool | None = None, prompt_continuation: PromptContinuationText | None = None, wrap_lines: FilterOrBool | None = None, enable_history_search: FilterOrBool | None = None, search_ignore_case: FilterOrBool | None = None, complete_while_typing: FilterOrBool | None = None, validate_while_typing: FilterOrBool | None = None, complete_style: CompleteStyle | None = None, auto_suggest: AutoSuggest | None = None, validator: Validator | None = None, clipboard: Clipboard | None = None, mouse_support: FilterOrBool | None = None, input_processors: list[Processor] | None = None, placeholder: AnyFormattedText | None = None, reserve_space_for_menu: int | None = None, enable_system_prompt: FilterOrBool | None = None, enable_suspend: FilterOrBool | None = None, enable_open_in_editor: FilterOrBool | None = None, tempfile_suffix: str | Callable[[], str] | None = None, tempfile: str | Callable[[], str] | None = None, default: str = '', accept_default: bool = False, pre_run: Callable[[], None] | None = None) → str
|
||||
|
||||
I apologize for the confusion earlier. It seems that the `prompt_toolkit.prompt()` function does not accept `stdin` and `stdout` arguments directly. Instead, we need to use the `Application` class from `prompt_toolkit` to create a custom application with the desired input and output. Here's how to modify the `aider/getinput.py` file:
|
||||
|
@ -245,7 +239,6 @@ First, import the necessary classes and functions from `prompt_tool
|
|||
|
||||
> ^C KeyboardInterrupt
|
||||
|
||||
---
|
||||
#### class prompt_toolkit.shortcuts.PromptSession(message: AnyFormattedText = '', *, multiline: FilterOrBool = False, wrap_lines: FilterOrBool = True, is_password: FilterOrBool = False, vi_mode: bool = False, editing_mode: EditingMode = <EditingMode.EMACS: 'EMACS'>, complete_while_typing: FilterOrBool = True, validate_while_typing: FilterOrBool = True, enable_history_search: FilterOrBool = False, search_ignore_case: FilterOrBool = False, lexer: Lexer | None = None, enable_system_prompt: FilterOrBool = False, enable_suspend: FilterOrBool = False, enable_open_in_editor: FilterOrBool = False, validator: Validator | None = None, completer: Completer | None = None, complete_in_thread: bool = False, reserve_space_for_menu: int = 8, complete_style: CompleteStyle = <CompleteStyle.COLUMN: 'COLUMN'>, auto_suggest: AutoSuggest | None = None, style: BaseStyle | None = None, style_transformation: StyleTransformation | None = None, swap_light_and_dark_colors: FilterOrBool = False, color_depth: ColorDepth | None = None, cursor: AnyCursorShapeConfig = None, include_default_pygments_style: FilterOrBool = True, history: History | None = None, clipboard: Clipboard | None = None, prompt_continuation: PromptContinuationText | None = None, rprompt: AnyFormattedText = None, bottom_toolbar: AnyFormattedText = None, mouse_support: FilterOrBool = False, input_processors: list[Processor] | None = None, placeholder: AnyFormattedText | None = None, key_bindings: KeyBindingsBase | None = None, erase_when_done: bool = False, tempfile_suffix: str | Callable[[], str] | None = '.txt', tempfile: str | Callable[[], str] | None = None, refresh_interval: float = 0, input: Input | None = None, output: Output | None = None)
|
||||
|
||||
Thank you for providing the `PromptSession` class information. We can use the `PromptSession` class to create a custom session with the desired input and output. Here's how to modify the `aider/getinput.py` file:
|
||||
|
@ -297,14 +290,12 @@ These changes will ensure that the `input` and `output` arguments are passed cor
|
|||
> Applied edit to aider/getinput.py
|
||||
> Commit ac92cca aider: Replaced `prompt()` with `PromptSession()` to correctly pass input and output arguments.
|
||||
|
||||
---
|
||||
#### try using create_input(StringIO('')) in the tests
|
||||
|
||||
|
||||
I understand that you want to use `create_input(StringIO(''))` in the tests. However, I need more information about which test cases you want to apply this change to and how you want to use it. Please provide more details or examples.
|
||||
|
||||
|
||||
---
|
||||
#### the ones that currently use create_pipe_input()
|
||||
|
||||
I see that you want to replace `create_pipe_input()` with `create_input(StringIO(''))` in the test cases. Here are the changes for the `tests/test_main.py` file:
|
||||
|
@ -354,7 +345,6 @@ These changes will replace the usage of `create_pipe_input()` with `create_input
|
|||
> Applied edit to tests/test_main.py
|
||||
> Commit 4bb043f aider: Replaced the usage of `create_pipe_input()` with `create_input(StringIO(''))` in the test cases.
|
||||
|
||||
---
|
||||
#### nice, that worked!
|
||||
|
||||
I'm glad the changes worked for you! If you have any more requests or need further assistance, feel free to ask.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue