mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
catch ExhaustedContextWindow
This commit is contained in:
parent
db47ac9f39
commit
684afd3242
1 changed files with 6 additions and 1 deletions
|
@ -355,7 +355,12 @@ class Coder:
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
utils.show_messages(messages)
|
utils.show_messages(messages)
|
||||||
|
|
||||||
|
try:
|
||||||
content, interrupted = self.send(messages)
|
content, interrupted = self.send(messages)
|
||||||
|
except ExhaustedContextWindow as err:
|
||||||
|
self.io.tool_error(str(err))
|
||||||
|
return
|
||||||
|
|
||||||
if interrupted:
|
if interrupted:
|
||||||
self.io.tool_error("\n\n^C KeyboardInterrupt")
|
self.io.tool_error("\n\n^C KeyboardInterrupt")
|
||||||
content += "\n^C KeyboardInterrupt"
|
content += "\n^C KeyboardInterrupt"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue