INNER CODE UNIT · Python
delete
adamyodinsky/TerminalGPT · terminalgpt/main.py:392
def delete(ctx):
"""Delete previous conversations."""
printer: Printer = PrinterFactory.get_printer("plain")
conv_manager: ConversationManager = ctx.obj["CONV_MANAGER"]
printer.printt(PrintUtils.CONVERSATIONS_INIT_MESSAGE)
while True:
conversations = conv_manager.get_conversations()
msg = (
Style.BRIGHT
+ Fore.RED
+ "\n** There are no conversations to delete! **"
+ Style.RESET_ALL
)
if conv_manager.is_conversations_empty(files=conversations, message=msg):