File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
libs/naas-abi-core/naas_abi_core/services/agent Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -874,7 +874,8 @@ def current_active_agent(self, state: ABIAgentState) -> Command:
874874 logger .debug (f"💬 Starting chatting with agent '{ self .name } '" )
875875 updated_system_prompt = state ["system_prompt" ]
876876 if (
877- self .state .supervisor_agent != self .name
877+ self .state .supervisor_agent is not None
878+ and self .state .supervisor_agent != self .name
878879 and "SUPERVISOR SYSTEM PROMPT" not in state ["system_prompt" ]
879880 ):
880881 # This agent is a subagent with a supervisor
@@ -1096,6 +1097,7 @@ def call_tools(self, state: ABIAgentState) -> list[Command]:
10961097 tool_response is not None
10971098 and hasattr (tool_response , "name" )
10981099 and tool_response .name == "request_help"
1100+ and self ._state .supervisor_agent is not None
10991101 and self ._state .supervisor_agent != self .name
11001102 ):
11011103 self ._state .set_current_active_agent (self ._state .supervisor_agent )
You can’t perform that action at this time.
0 commit comments