Imporve /open command: detetive target before open.

This commit is contained in:
Liu Zhicong
2023-10-03 18:52:10 -07:00
parent a92b3f15dc
commit 4f43c4abed
5 changed files with 25 additions and 7 deletions
@@ -48,6 +48,12 @@ class AgentManager:
pass
async def is_exist(self,agent_id:str) -> bool:
the_aget = await self.get(agent_id)
if the_aget:
return True
return False
async def get(self,agent_id:str) -> AIAgent:
the_agent = self.loaded_agent_instance.get(agent_id)
if the_agent: