mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
feat: implement countdown for retry in 0.1-second increments
This commit is contained in:
parent
3f6ae4b2d9
commit
608c80404e
1 changed files with 6 additions and 1 deletions
|
@ -907,7 +907,12 @@ class Coder:
|
||||||
if retry_delay > 60:
|
if retry_delay > 60:
|
||||||
break
|
break
|
||||||
self.io.tool_output(f"Retrying in {retry_delay:.1f} seconds...")
|
self.io.tool_output(f"Retrying in {retry_delay:.1f} seconds...")
|
||||||
time.sleep(retry_delay)
|
countdown = retry_delay
|
||||||
|
while countdown > 0:
|
||||||
|
print(f"Retrying in {countdown:.1f} seconds...\r", end="")
|
||||||
|
time.sleep(0.1)
|
||||||
|
countdown -= 0.1
|
||||||
|
print(" " * 50 + "\r", end="") # Clear the line after countdown
|
||||||
continue
|
continue
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
interrupted = True
|
interrupted = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue