mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
fix: Improve LLM empty response handling with clearer warning messages
This commit is contained in:
parent
012afc0708
commit
204a88c171
2 changed files with 8 additions and 4 deletions
|
@ -933,6 +933,10 @@ class InputOutput:
|
|||
return mdStream
|
||||
|
||||
def assistant_output(self, message, pretty=None):
|
||||
if not message:
|
||||
self.tool_warning("Empty response received from LLM. Check your provider account?")
|
||||
return
|
||||
|
||||
show_resp = message
|
||||
|
||||
# Coder will force pretty off if fence is not triple-backticks
|
||||
|
@ -944,7 +948,7 @@ class InputOutput:
|
|||
message, style=self.assistant_output_color, code_theme=self.code_theme
|
||||
)
|
||||
else:
|
||||
show_resp = Text(message or "<no response>")
|
||||
show_resp = Text(message or "(empty response)")
|
||||
|
||||
self.console.print(show_resp)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue