The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(cli): hoist the gateway_client import in the switch helper
kshitijk4poor198175f1978c
diff --git a/hermes_cli/cli_session_switch.py b/hermes_cli/cli_session_switch.pyindex 8e5d6e7294a..75d688738f8 100644--- a/hermes_cli/cli_session_switch.py+++ b/hermes_cli/cli_session_switch.py@@ -7,6 +7,7 @@ from __future__ import annotationsfrom contextlib import suppress+from hermes_cli.gateway_client import GatewayClientError, GatewayRPCErrorfrom hermes_cli.gateway_connection import RESUME_GONE@@ -38,7 +39,6 @@ def _open_switched_session(cli, session_id: str) -> str | None:attach = getattr(store, "attach", None)if not callable(attach):return None- from hermes_cli.gateway_client import GatewayClientError, GatewayRPCErrortry:attach(session_id)except GatewayRPCError as exc:@@ -49,7 +49,6 @@ def _open_switched_session(cli, session_id: str) -> str | None:# No answer (unavailable, disconnected, timeout). The switch's reads are local, so it# proceeds as before; the turn reports the lost connection itself.return None- return Nonedef _sync_agent_to_session(cli, session_id: str, *, parent_session_id: str, reason: str) -> None: