fix(platforms): QR fallback tip uses uv against the running interpreter
The standard Hermes install is a `uv venv`, which ships no `pip` module: `<venv>/bin/python -m pip install qrcode` fails with "No module named pip" (the exact console output in #111695). Switch all four QR-fallback tips (Feishu, WeCom, QQ onboarding, Telegram managed bot) to `uv pip install --python <sys.executable> qrcode`, the form the in-tree plugin install hints already use (hindsight, mem0), so the printed command works as-is and still targets the active profile's interpreter. Adds the Feishu-surface invariant test from #111696 and tightens the Telegram test to the working command form. Co-authored-by: KoNit-K <124019182+KoNit-K@users.noreply.github.com>
This commit is contained in:
@@ -4104,7 +4104,7 @@ def _qr_register_inner(*, initial_domain: str, timeout_seconds: int) -> Optional
|
||||
print(f"\n Scan the QR code above, or open this URL directly:\n {qr_url}")
|
||||
else:
|
||||
print(f" Open this URL in Feishu / Lark on your phone:\n\n {qr_url}\n")
|
||||
print(f" Tip: {sys.executable} -m pip install qrcode to display a scannable QR code here next time")
|
||||
print(f" Tip: uv pip install --python {sys.executable} qrcode to display a scannable QR code here next time")
|
||||
print()
|
||||
result = _poll_registration(
|
||||
device_code=begin["device_code"], interval=begin["interval"],
|
||||
|
||||
@@ -675,7 +675,7 @@ def qr_scan_for_bot_info(*, timeout_seconds: int = _QR_POLL_TIMEOUT) -> Optional
|
||||
print(f"\n Scan the QR code above, or open this URL directly:\n {page_url}")
|
||||
except Exception:
|
||||
print(f" Open this URL in WeCom on your phone:\n\n {page_url}\n")
|
||||
print(f" Tip: {sys.executable} -m pip install qrcode to display a scannable QR code here next time")
|
||||
print(f" Tip: uv pip install --python {sys.executable} qrcode to display a scannable QR code here next time")
|
||||
print("\n Fetching configuration results...", end="", flush=True)
|
||||
deadline = time.monotonic() + timeout_seconds
|
||||
query_url = f"{_QR_QUERY_URL}?scode={urllib.parse.quote(scode)}"
|
||||
|
||||
Reference in New Issue
Block a user