mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +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
|
||||
# always display, even on very limited terminals.
|
||||
ascii_frames = """
|
||||
[#=-----]
|
||||
[=#-----]
|
||||
[-=#----]
|
||||
[--=#---]
|
||||
[---=#--]
|
||||
[----=#-]
|
||||
[-----=#]
|
||||
[-----#=]
|
||||
[----#=-]
|
||||
[---#=--]
|
||||
[--#=---]
|
||||
[-#=----]
|
||||
[#=- ]
|
||||
[=# ]
|
||||
[-=# ]
|
||||
[ -=# ]
|
||||
[ -=# ]
|
||||
[ -=# ]
|
||||
[ -=#]
|
||||
[ #=]
|
||||
[ #=-]
|
||||
[ #=- ]
|
||||
[ #=- ]
|
||||
[ #=- ]
|
||||
""".strip().splitlines()
|
||||
|
||||
xlate = ("-=#", "≈≋≣")
|
||||
|
||||
# If unicode is supported, swap the ASCII chars for nicer glyphs.
|
||||
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]
|
||||
else:
|
||||
scan_char, _ = "#", "-"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue