mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
roughed in run(with_message)
This commit is contained in:
parent
208b3c2022
commit
cf3637dd5c
1 changed files with 10 additions and 7 deletions
|
@ -93,6 +93,7 @@ class Coder:
|
|||
self.abs_fnames = set()
|
||||
self.cur_messages = []
|
||||
self.done_messages = []
|
||||
self.num_control_c = 0
|
||||
|
||||
self.io = io
|
||||
|
||||
|
@ -263,18 +264,20 @@ class Coder:
|
|||
|
||||
return files_messages
|
||||
|
||||
def run(self):
|
||||
self.done_messages = []
|
||||
self.cur_messages = []
|
||||
|
||||
self.num_control_c = 0
|
||||
|
||||
def run(self, with_message=None):
|
||||
while True:
|
||||
try:
|
||||
new_user_message = self.run_loop()
|
||||
if with_message:
|
||||
new_user_message = with_message
|
||||
else:
|
||||
new_user_message = self.run_loop()
|
||||
|
||||
while new_user_message:
|
||||
new_user_message = self.send_new_user_message(new_user_message)
|
||||
|
||||
if with_message:
|
||||
return
|
||||
|
||||
except KeyboardInterrupt:
|
||||
self.num_control_c += 1
|
||||
if self.num_control_c >= 2:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue