From 46997ee7ed674ed15d31ac191a3c9823af1be512 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 2 Sep 2026 20:50:24 -0700 Subject: [PATCH] refactor(hermes_cli): statement packing (AST-neutral) --- hermes_cli/setup_summary.py | 3 +-- hermes_cli/status_auth.py | 6 +----- hermes_cli/stdio.py | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hermes_cli/setup_summary.py b/hermes_cli/setup_summary.py index 858bfc4861..1674b04ac9 100644 --- a/hermes_cli/setup_summary.py +++ b/hermes_cli/setup_summary.py @@ -58,8 +58,7 @@ _EDIT_CONFIG_ROWS = ( ("hermes config set ", ""), ) _READY_ROWS = ( - ("hermes", " Start chatting"), - ("hermes gateway", " Start messaging gateway"), + ("hermes", " Start chatting"), ("hermes gateway", " Start messaging gateway"), ("hermes doctor", " Check for issues"), ) diff --git a/hermes_cli/status_auth.py b/hermes_cli/status_auth.py index 57ba3acf6d..b7ce339895 100644 --- a/hermes_cli/status_auth.py +++ b/hermes_cli/status_auth.py @@ -70,15 +70,12 @@ _API_KEYS: dict[str, str | tuple[str, ...]] = { "GitHub": "GITHUB_TOKEN", } - # OAuth detail rows: (label, status key, formatter, gate) — see _oauth_block. _FILE_REFRESH_ROWS = ( ("Auth file:", "auth_store", None, None), - ("Refreshed:", "last_refresh", _format_iso_timestamp, None), - ("Error:", "error", None, False), + ("Refreshed:", "last_refresh", _format_iso_timestamp, None), ("Error:", "error", None, False), ) - _OAUTH_BLOCKS = ( # (row name, auth getter, login hint, detail rows) ("OpenAI Codex", "get_codex_auth_status", "hermes model", _FILE_REFRESH_ROWS), @@ -93,7 +90,6 @@ _OAUTH_BLOCKS = ( ("xAI OAuth", "get_xai_oauth_auth_status", "hermes auth add xai-oauth", _FILE_REFRESH_ROWS), ) - _APIKEY_PROVIDERS = { "Z.AI / GLM": ("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"), "Kimi / Moonshot": ("KIMI_API_KEY",), diff --git a/hermes_cli/stdio.py b/hermes_cli/stdio.py index 8fb6a8e492..151040d983 100644 --- a/hermes_cli/stdio.py +++ b/hermes_cli/stdio.py @@ -12,7 +12,6 @@ import sys __all__ = ["configure_windows_stdio", "is_windows"] - _CONFIGURED = False