From c4cdf3b861d8e08f948cbf0366b36b92ce556aae Mon Sep 17 00:00:00 2001 From: WideLee Date: Fri, 17 Apr 2026 18:26:47 +0800 Subject: [PATCH] refactor(qqbot): change setup method selection prompt_choice style --- hermes_cli/gateway.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hermes_cli/gateway.py b/hermes_cli/gateway.py index 35a8745a9..d53b5ca0e 100644 --- a/hermes_cli/gateway.py +++ b/hermes_cli/gateway.py @@ -2638,12 +2638,19 @@ def _setup_qqbot(): if not prompt_yes_no(" Reconfigure QQ Bot?", False): return - # ── QR scan or manual ── + # ── Choose setup method ── + print() + method_choices = [ + "Scan QR code to add bot automatically (recommended)", + "Enter existing App ID and App Secret manually", + ] + method_idx = prompt_choice(" How would you like to set up QQ Bot?", method_choices, 0) + credentials = None used_qr = False - print() - if prompt_yes_no(" Scan QR code to add bot automatically?", True): + if method_idx == 0: + # ── QR scan-to-configure ── try: credentials = _qqbot_qr_flow() except KeyboardInterrupt: