From b467ff2e4cffbf35a83bee5bdb9169ebbcc45b43 Mon Sep 17 00:00:00 2001 From: 4pmtong Date: Tue, 12 May 2026 12:37:00 +0800 Subject: [PATCH] add remote sub agent --- backend/app/remote_sub_agent/config.py | 1 - backend/app/remote_sub_agent/constants.py | 1 - backend/app/remote_sub_agent/provider_registry.py | 13 ++++++++----- backend/app/remote_sub_agent/runtime.py | 8 ++------ 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/backend/app/remote_sub_agent/config.py b/backend/app/remote_sub_agent/config.py index 4155dbf8..ba15e9a7 100644 --- a/backend/app/remote_sub_agent/config.py +++ b/backend/app/remote_sub_agent/config.py @@ -29,4 +29,3 @@ class RemoteSubAgentConfig(BaseModel): enabled: bool = False provider: str = DEFAULT_REMOTE_SUB_AGENT_PROVIDER gemini_agents: GeminiRemoteSubAgentConfig | None = None - diff --git a/backend/app/remote_sub_agent/constants.py b/backend/app/remote_sub_agent/constants.py index 0b723562..b30239c3 100644 --- a/backend/app/remote_sub_agent/constants.py +++ b/backend/app/remote_sub_agent/constants.py @@ -13,4 +13,3 @@ # ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. ========= DEFAULT_REMOTE_SUB_AGENT_PROVIDER = "gemini_agents" - diff --git a/backend/app/remote_sub_agent/provider_registry.py b/backend/app/remote_sub_agent/provider_registry.py index 8abc7040..7a98a16c 100644 --- a/backend/app/remote_sub_agent/provider_registry.py +++ b/backend/app/remote_sub_agent/provider_registry.py @@ -36,11 +36,14 @@ class RemoteSubAgentProviderAdapter: def get_configured_provider_name( remote_sub_agent_config: Any | None, ) -> str: - return _config_str( - remote_sub_agent_config, - "provider", - DEFAULT_REMOTE_SUB_AGENT_PROVIDER, - ) or DEFAULT_REMOTE_SUB_AGENT_PROVIDER + return ( + _config_str( + remote_sub_agent_config, + "provider", + DEFAULT_REMOTE_SUB_AGENT_PROVIDER, + ) + or DEFAULT_REMOTE_SUB_AGENT_PROVIDER + ) def get_provider_config( diff --git a/backend/app/remote_sub_agent/runtime.py b/backend/app/remote_sub_agent/runtime.py index 03ad99f7..9571e186 100644 --- a/backend/app/remote_sub_agent/runtime.py +++ b/backend/app/remote_sub_agent/runtime.py @@ -60,12 +60,8 @@ class RemoteSubAgentRuntime: remote_agent_name=request.remote_agent_name, session_key=session_key, ) - if ( - not request.reuse_session - and ( - session.remote_interaction_id - or session.remote_environment_id - ) + if not request.reuse_session and ( + session.remote_interaction_id or session.remote_environment_id ): logger.info( "RemoteSubAgent existing session found; reusing it",