mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
fix: Handle summarizer failure gracefully with fallback and warning
This commit is contained in:
parent
b49fea87ab
commit
5c866c67b5
1 changed files with 6 additions and 1 deletions
|
@ -144,7 +144,12 @@ class Coder:
|
||||||
# the system prompt.
|
# the system prompt.
|
||||||
done_messages = from_coder.done_messages
|
done_messages = from_coder.done_messages
|
||||||
if edit_format != from_coder.edit_format and done_messages and summarize_from_coder:
|
if edit_format != from_coder.edit_format and done_messages and summarize_from_coder:
|
||||||
done_messages = from_coder.summarizer.summarize_all(done_messages)
|
try:
|
||||||
|
done_messages = from_coder.summarizer.summarize_all(done_messages)
|
||||||
|
except ValueError as e:
|
||||||
|
# If summarization fails, keep the original messages and warn the user
|
||||||
|
io.tool_warning("Chat history summarization failed, continuing with full history")
|
||||||
|
io.tool_warning(str(e))
|
||||||
|
|
||||||
# Bring along context from the old Coder
|
# Bring along context from the old Coder
|
||||||
update = dict(
|
update = dict(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue