mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
show_send_output should respect silent
This commit is contained in:
parent
579d28dcf0
commit
94548b712e
1 changed files with 7 additions and 2 deletions
|
@ -336,9 +336,11 @@ class Coder:
|
||||||
return self.resp, interrupted
|
return self.resp, interrupted
|
||||||
|
|
||||||
def show_send_output(self, completion, silent):
|
def show_send_output(self, completion, silent):
|
||||||
if self.pretty:
|
if self.pretty and not silent:
|
||||||
live = Live(vertical_overflow="scroll")
|
live = Live(vertical_overflow="scroll")
|
||||||
live.start()
|
live.start()
|
||||||
|
else:
|
||||||
|
live = None
|
||||||
|
|
||||||
for chunk in completion:
|
for chunk in completion:
|
||||||
if chunk.choices[0].finish_reason not in (None, "stop"):
|
if chunk.choices[0].finish_reason not in (None, "stop"):
|
||||||
|
@ -350,6 +352,9 @@ class Coder:
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if silent:
|
||||||
|
continue
|
||||||
|
|
||||||
if self.pretty:
|
if self.pretty:
|
||||||
md = Markdown(self.resp, style="blue", code_theme="default")
|
md = Markdown(self.resp, style="blue", code_theme="default")
|
||||||
live.update(md)
|
live.update(md)
|
||||||
|
@ -357,7 +362,7 @@ class Coder:
|
||||||
sys.stdout.write(text)
|
sys.stdout.write(text)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
if self.pretty:
|
if live:
|
||||||
live.stop()
|
live.stop()
|
||||||
|
|
||||||
pattern = re.compile(
|
pattern = re.compile(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue