mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 03:35:00 +00:00
refactor: Move message and style initialization before try block in InputOutput
This commit is contained in:
parent
cec9f90c1c
commit
48b8f54c12
1 changed files with 2 additions and 2 deletions
|
@ -804,9 +804,9 @@ class InputOutput:
|
|||
hist = message.strip() if strip else message
|
||||
self.append_chat_history(hist, linebreak=True, blockquote=True)
|
||||
|
||||
message = Text(message)
|
||||
style = dict(style=color) if self.pretty and color else dict()
|
||||
try:
|
||||
message = Text(message)
|
||||
style = dict(style=color) if self.pretty and color else dict()
|
||||
self.console.print(message, **style)
|
||||
except UnicodeEncodeError:
|
||||
# Fallback to ASCII-safe output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue