mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
yield from
This commit is contained in:
parent
c32666b1c5
commit
296a336d22
1 changed files with 3 additions and 6 deletions
|
@ -409,8 +409,7 @@ class Coder:
|
||||||
def run_stream(self, user_message):
|
def run_stream(self, user_message):
|
||||||
self.io.user_input(user_message)
|
self.io.user_input(user_message)
|
||||||
self.reflected_message = None
|
self.reflected_message = None
|
||||||
for chunk in self.send_new_user_message(user_message):
|
yield from self.send_new_user_message(user_message)
|
||||||
yield chunk
|
|
||||||
|
|
||||||
def run(self, with_message=None):
|
def run(self, with_message=None):
|
||||||
while True:
|
while True:
|
||||||
|
@ -561,8 +560,7 @@ class Coder:
|
||||||
exhausted = False
|
exhausted = False
|
||||||
interrupted = False
|
interrupted = False
|
||||||
try:
|
try:
|
||||||
for chunk in self.send(messages, functions=self.functions):
|
yield from self.send(messages, functions=self.functions)
|
||||||
yield chunk
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
interrupted = True
|
interrupted = True
|
||||||
except ExhaustedContextWindow:
|
except ExhaustedContextWindow:
|
||||||
|
@ -688,8 +686,7 @@ class Coder:
|
||||||
self.chat_completion_call_hashes.append(hash_object.hexdigest())
|
self.chat_completion_call_hashes.append(hash_object.hexdigest())
|
||||||
|
|
||||||
if self.stream:
|
if self.stream:
|
||||||
for chunk in self.show_send_output_stream(completion):
|
yield from self.show_send_output_stream(completion)
|
||||||
yield chunk
|
|
||||||
else:
|
else:
|
||||||
self.show_send_output(completion)
|
self.show_send_output(completion)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue