mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
fix: handle UnicodeEncodeError in prompt session
This commit is contained in:
parent
eced076602
commit
964fe7e2dc
1 changed files with 5 additions and 1 deletions
|
@ -345,7 +345,11 @@ class InputOutput:
|
||||||
session = PromptSession(
|
session = PromptSession(
|
||||||
key_bindings=kb, editing_mode=self.editingmode, **session_kwargs
|
key_bindings=kb, editing_mode=self.editingmode, **session_kwargs
|
||||||
)
|
)
|
||||||
line = session.prompt()
|
try:
|
||||||
|
line = session.prompt()
|
||||||
|
except UnicodeEncodeError as err:
|
||||||
|
self.io.tool_error(str(err))
|
||||||
|
return ""
|
||||||
|
|
||||||
if line and line[0] == "{" and not multiline_input:
|
if line and line[0] == "{" and not multiline_input:
|
||||||
multiline_input = True
|
multiline_input = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue