mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 11:14:59 +00:00
refactor: Move reply_completed call before KeyboardInterrupt handling
This commit is contained in:
parent
7ff2dc89b4
commit
f8243b3632
1 changed files with 5 additions and 1 deletions
|
@ -1193,12 +1193,16 @@ class Coder:
|
||||||
else:
|
else:
|
||||||
content = ""
|
content = ""
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.reply_completed()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
interrupted = True
|
||||||
|
|
||||||
if interrupted:
|
if interrupted:
|
||||||
content += "\n^C KeyboardInterrupt"
|
content += "\n^C KeyboardInterrupt"
|
||||||
self.cur_messages += [dict(role="assistant", content=content)]
|
self.cur_messages += [dict(role="assistant", content=content)]
|
||||||
return
|
return
|
||||||
|
|
||||||
self.reply_completed()
|
|
||||||
edited = self.apply_updates()
|
edited = self.apply_updates()
|
||||||
|
|
||||||
self.update_cur_messages()
|
self.update_cur_messages()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue