diff --git a/aider/mdstream.py b/aider/mdstream.py index 9d71a76f0..947777651 100755 --- a/aider/mdstream.py +++ b/aider/mdstream.py @@ -95,12 +95,7 @@ class MarkdownStream: show = lines[num_printed:num_lines] show = "".join(show) show = Text.from_ansi(show) - try: - self.live.console.print(show) - except UnicodeEncodeError as err: - print("unicode error", err) - print("show string", repr(show.encode("utf-8"))) - raise err + self.live.console.print(show) self.printed = lines[:num_lines] diff --git a/aider/tests/test_wholefile.py b/aider/tests/test_wholefile.py index 3ebec1571..10e996dec 100644 --- a/aider/tests/test_wholefile.py +++ b/aider/tests/test_wholefile.py @@ -288,7 +288,9 @@ after b files = [file1] # Initialize the Coder object with the mocked IO and mocked repo - coder = Coder.create(self.GPT35, "whole", io=InputOutput(), fnames=files, stream=False) + coder = Coder.create( + self.GPT35, "whole", io=InputOutput(), fnames=files, stream=False, pretty=False + ) # no trailing newline so the response content below doesn't add ANOTHER newline new_content = "new\ntwo\nthree" @@ -307,6 +309,7 @@ Do this: return [] coder.send = MagicMock(side_effect=mock_send) + coder.live_incremental_response = lambda x: x # Call the run method with a message coder.run(with_message="hi")