mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-03 01:30:11 +00:00
20 lines
512 B
Python
20 lines
512 B
Python
|
|
from colorama import Fore
|
|
|
|
def pretty_print(text, color = "info"):
|
|
"""
|
|
print text with color
|
|
"""
|
|
color_map = {
|
|
"success": Fore.GREEN,
|
|
"failure": Fore.RED,
|
|
"status": Fore.LIGHTGREEN_EX,
|
|
"code": Fore.LIGHTBLUE_EX,
|
|
"warning": Fore.YELLOW,
|
|
"output": Fore.LIGHTCYAN_EX,
|
|
}
|
|
if color not in color_map:
|
|
print(text)
|
|
pretty_print("Invalid color in pretty_print", "warning")
|
|
return
|
|
print(color_map[color], text, Fore.RESET) |