mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 11:05:26 +00:00
fix : display carriage problem
This commit is contained in:
parent
9561ca95a1
commit
45818b1eba
@ -90,11 +90,12 @@ def animate_thinking(text, color="status", duration=120):
|
||||
break
|
||||
symbol = next(spinner)
|
||||
if platform.system().lower() != "windows":
|
||||
print(f"{fore_color}{symbol} {text}{Fore.RESET}", flush=True)
|
||||
print(f"\r{fore_color}{symbol} {text}{Fore.RESET}", end="", flush=True)
|
||||
else:
|
||||
print(colored(f"{symbol} {text}", term_color), flush=True)
|
||||
time.sleep(0.1)
|
||||
print("\033[1A\033[K", end="", flush=True)
|
||||
print(f"\r{colored(f'{symbol} {text}', term_color)}", end="", flush=True)
|
||||
time.sleep(0.2)
|
||||
print("\r" + " " * (len(text) + 7) + "\r", end="", flush=True)
|
||||
print()
|
||||
animation_thread = threading.Thread(target=_animate, daemon=True)
|
||||
animation_thread.start()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user