Fix: Gracefully handle KeyboardInterrupt on exit.

This commit is contained in:
2025-10-29 12:46:00 +01:00
parent 88ee64bf04
commit a94d9293f3

View File

@@ -159,6 +159,8 @@ def main():
else:
console.print("[yellow]No new messages or an error occurred. Retrying...[/yellow]")
time.sleep(5) # Wait 5 seconds before retrying on error
except KeyboardInterrupt:
pass # Exit gracefully on Ctrl+C
finally:
log_file.close()
save_log = input(f"\nDo you want to save the chat log to {log_filename}? (y/n): ").lower()