mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
cleanup
This commit is contained in:
parent
580c52bd85
commit
af4f224c00
1 changed files with 3 additions and 18 deletions
|
@ -40,23 +40,6 @@ The end.
|
||||||
""" # noqa: E501
|
""" # noqa: E501
|
||||||
|
|
||||||
|
|
||||||
def showit(lines):
|
|
||||||
return
|
|
||||||
|
|
||||||
num_lines = len(lines)
|
|
||||||
d = 10
|
|
||||||
if num_lines < d:
|
|
||||||
start = 0
|
|
||||||
else:
|
|
||||||
start = num_lines - d
|
|
||||||
|
|
||||||
print("-" * 50)
|
|
||||||
for i in range(start, num_lines):
|
|
||||||
line = repr(lines[i])[:70]
|
|
||||||
print(f"{i:02d}:{line}")
|
|
||||||
print("-" * 50)
|
|
||||||
|
|
||||||
|
|
||||||
class MarkdownStream:
|
class MarkdownStream:
|
||||||
live = None
|
live = None
|
||||||
when = 0
|
when = 0
|
||||||
|
@ -75,7 +58,8 @@ class MarkdownStream:
|
||||||
self.live.start()
|
self.live.start()
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
self.live.stop()
|
if self.live:
|
||||||
|
self.live.stop()
|
||||||
|
|
||||||
def update(self, text, final=False):
|
def update(self, text, final=False):
|
||||||
now = time.time()
|
now = time.time()
|
||||||
|
@ -115,6 +99,7 @@ class MarkdownStream:
|
||||||
if final:
|
if final:
|
||||||
self.live.update(Text(""))
|
self.live.update(Text(""))
|
||||||
self.live.stop()
|
self.live.stop()
|
||||||
|
self.live = None
|
||||||
else:
|
else:
|
||||||
rest = lines[num_lines:]
|
rest = lines[num_lines:]
|
||||||
rest = "".join(rest)
|
rest = "".join(rest)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue