mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
chore: Update waiting spinner
This commit is contained in:
parent
4e86a82a08
commit
2d34b738bc
2 changed files with 18 additions and 13 deletions
|
@ -1419,7 +1419,7 @@ class Coder:
|
||||||
|
|
||||||
self.multi_response_content = ""
|
self.multi_response_content = ""
|
||||||
if self.show_pretty():
|
if self.show_pretty():
|
||||||
self.waiting_spinner = WaitingSpinner("Waiting for LLM")
|
self.waiting_spinner = WaitingSpinner("Waiting for " + self.main_model.name)
|
||||||
self.waiting_spinner.start()
|
self.waiting_spinner.start()
|
||||||
if self.stream:
|
if self.stream:
|
||||||
self.mdstream = self.io.get_assistant_mdstream()
|
self.mdstream = self.io.get_assistant_mdstream()
|
||||||
|
|
|
@ -270,21 +270,22 @@ class Spinner:
|
||||||
# Pre-render the animation frames using pure ASCII so they will
|
# Pre-render the animation frames using pure ASCII so they will
|
||||||
# always display, even on very limited terminals.
|
# always display, even on very limited terminals.
|
||||||
ascii_frames = """
|
ascii_frames = """
|
||||||
[#=- ]
|
[#= ]
|
||||||
[=# ]
|
[=# ]
|
||||||
[-=# ]
|
[ =# ]
|
||||||
[ -=# ]
|
[ =# ]
|
||||||
[ -=# ]
|
[ =# ]
|
||||||
[ -=# ]
|
[ =# ]
|
||||||
[ -=#]
|
[ =#]
|
||||||
[ #=]
|
[ #=]
|
||||||
[ #=-]
|
[ #= ]
|
||||||
[ #=- ]
|
[ #= ]
|
||||||
[ #=- ]
|
[ #= ]
|
||||||
[ #=- ]
|
[ #= ]
|
||||||
""".strip().splitlines()
|
""".strip().splitlines()
|
||||||
|
|
||||||
xlate_from, xlate_to = ("-=#", "─=≡")
|
self.unicode_palette = "≋≣"
|
||||||
|
xlate_from, xlate_to = ("=#", self.unicode_palette)
|
||||||
|
|
||||||
# If unicode is supported, swap the ASCII chars for nicer glyphs.
|
# If unicode is supported, swap the ASCII chars for nicer glyphs.
|
||||||
if self._supports_unicode():
|
if self._supports_unicode():
|
||||||
|
@ -305,7 +306,11 @@ class Spinner:
|
||||||
if not self.is_tty:
|
if not self.is_tty:
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
sys.stdout.write("≡\b─\b \b")
|
out = self.unicode_palette
|
||||||
|
out += "\b" * len(self.unicode_palette)
|
||||||
|
out += " " * len(self.unicode_palette)
|
||||||
|
out += "\b" * len(self.unicode_palette)
|
||||||
|
sys.stdout.write(out)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
return True
|
return True
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue