File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11import  asyncio 
2- from  typing  import  List 
2+ from  typing  import  List ,  Union 
33
44from  flowllm  import  C , BaseAsyncOp 
55from  flowllm .enumeration .role  import  Role 
@@ -124,7 +124,7 @@ def parse_summary(message: Message) -> ToolMemory:
124124        return  result 
125125
126126    async  def  async_execute (self ):
127-         tool_names : str  =  self .context .get ("tool_names" , "" )
127+         tool_names : Union [ str ,  List [ str ]]  =  self .context .get ("tool_names" , "" )
128128        workspace_id : str  =  self .context .workspace_id 
129129
130130        if  not  tool_names :
@@ -133,8 +133,14 @@ async def async_execute(self):
133133            self .context .response .success  =  False 
134134            return 
135135
136-         # Split tool names by comma 
137-         tool_name_list  =  [name .strip () for  name  in  tool_names .split ("," ) if  name .strip ()]
136+         # Normalize tool_names to list 
137+         if  isinstance (tool_names , str ):
138+             # Split tool names by comma 
139+             tool_name_list  =  [name .strip () for  name  in  tool_names .split ("," ) if  name .strip ()]
140+         else :
141+             # Already a list 
142+             tool_name_list  =  [name .strip () for  name  in  tool_names  if  name .strip ()]
143+ 
138144        logger .info (f"workspace_id={ workspace_id }   processing { len (tool_name_list )}   tools: { tool_name_list }  " )
139145
140146        # Search for each tool in the vector store 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments