refactor(hermes_cli): statement packing (AST-neutral)
This commit is contained in:
@@ -58,8 +58,7 @@ _EDIT_CONFIG_ROWS = (
|
||||
("hermes config set <key> <value>", ""),
|
||||
)
|
||||
_READY_ROWS = (
|
||||
("hermes", " Start chatting"),
|
||||
("hermes gateway", " Start messaging gateway"),
|
||||
("hermes", " Start chatting"), ("hermes gateway", " Start messaging gateway"),
|
||||
("hermes doctor", " Check for issues"),
|
||||
)
|
||||
|
||||
|
||||
@@ -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",),
|
||||
|
||||
@@ -12,7 +12,6 @@ import sys
|
||||
|
||||
__all__ = ["configure_windows_stdio", "is_windows"]
|
||||
|
||||
|
||||
_CONFIGURED = False
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user