small fix for better error handling if the summarizer ever fails

- fix #231
This commit is contained in:
Joshua Vial 2023-09-06 15:00:35 +12:00
parent 30a3cc0847
commit 98097005c7
2 changed files with 7 additions and 1 deletions

View file

@ -359,7 +359,11 @@ class Coder:
self.summarizer_thread.start()
def summarize_worker(self):
self.summarized_done_messages = self.summarizer.summarize(self.done_messages)
try:
self.summarized_done_messages = self.summarizer.summarize(self.done_messages)
except ValueError as err:
self.io.tool_error(err.args[0])
if self.verbose:
self.io.tool_output("Finished summarizing chat history.")