mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
chore: Improve spinner ASCII animation
This commit is contained in:
parent
95cc362c07
commit
aad6838e15
1 changed files with 15 additions and 13 deletions
|
@ -270,23 +270,25 @@ 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 = ("-=#", "≈≋≣")
|
||||||
|
|
||||||
# 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():
|
||||||
scan_char, trail_char = "≡", "─"
|
scan_char, trail_char = "≣", ""
|
||||||
frames = [f.replace("#", scan_char).replace("-", trail_char) for f in ascii_frames]
|
frames = [f.replace("#", scan_char).replace("-", trail_char) for f in ascii_frames]
|
||||||
else:
|
else:
|
||||||
scan_char, _ = "#", "-"
|
scan_char, _ = "#", "-"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue