From c42d7d5422ee9a4b5632c9b3f2a661c6ff4a829f Mon Sep 17 00:00:00 2001 From: yeongpin Date: Fri, 11 Apr 2025 10:54:29 +0800 Subject: [PATCH] Add option to bypass token limit in menu - Updated the menu in `main.py` to include a new option for bypassing token limits. - Adjusted the choice number in the main loop to accommodate the new functionality. - Integrated the `bypass_token_limit` script to be executed when the new menu option is selected. --- main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 3d09097..8bca290 100644 --- a/main.py +++ b/main.py @@ -288,7 +288,8 @@ def print_menu(): 13: f"{Fore.GREEN}13{Style.RESET_ALL}. {EMOJI['SETTINGS']} {translator.get('menu.select_chrome_profile')}", 14: f"{Fore.GREEN}14{Style.RESET_ALL}. {EMOJI['ERROR']} {translator.get('menu.delete_google_account', fallback='Delete Cursor Google Account')}", 15: f"{Fore.GREEN}15{Style.RESET_ALL}. {EMOJI['UPDATE']} {translator.get('menu.bypass_version_check', fallback='Bypass Cursor Version Check')}", - 16: f"{Fore.GREEN}16{Style.RESET_ALL}. {EMOJI['UPDATE']} {translator.get('menu.check_user_authorized', fallback='Check User Authorized')}" + 16: f"{Fore.GREEN}16{Style.RESET_ALL}. {EMOJI['UPDATE']} {translator.get('menu.check_user_authorized', fallback='Check User Authorized')}", + 17: f"{Fore.GREEN}17{Style.RESET_ALL}. {EMOJI['UPDATE']} {translator.get('menu.bypass_token_limit', fallback='Bypass Token Limit')}" } # Automatically calculate the number of menu items in the left and right columns @@ -561,7 +562,7 @@ def main(): while True: try: - choice_num = 16 + choice_num = 17 choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices=f'0-{choice_num}')}: {Style.RESET_ALL}") if choice == "0": @@ -635,6 +636,10 @@ def main(): import check_user_authorized check_user_authorized.main(translator) print_menu() + elif choice == "17": + import bypass_token_limit + bypass_token_limit.run(translator) + print_menu() else: print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('menu.invalid_choice')}{Style.RESET_ALL}") print_menu()