handle not live case

This commit is contained in:
Paul Gauthier 2023-06-21 21:08:22 -07:00
parent f9086e66d3
commit 8c1e1c7267
2 changed files with 2 additions and 2 deletions

View file

@ -532,8 +532,8 @@ class Coder:
sys.stdout.write(text) sys.stdout.write(text)
sys.stdout.flush() sys.stdout.flush()
finally: finally:
self.live_incremental_response(live, True)
if live: if live:
self.live_incremental_response(live, True)
live.stop() live.stop()
def live_incremental_response(self, live, final): def live_incremental_response(self, live, final):

View file

@ -20,7 +20,7 @@ class WholeFileCoder(Coder):
else: else:
self.cur_messages += [dict(role="assistant", content=content)] self.cur_messages += [dict(role="assistant", content=content)]
def modify_incremental_response(self): def modify_incremental_response(self, final):
resp = self.partial_response_content resp = self.partial_response_content
return self.update_files(resp, mode="diff") return self.update_files(resp, mode="diff")