File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -501,12 +501,13 @@ def _convert_tool_use_to_agent_action(
501501 and x is not None
502502 and y is not None
503503 ):
504+ path_points = [
505+ Point (x = start_x , y = start_y ),
506+ Point (x = x , y = y ),
507+ ]
504508 action_payload_dict = {
505509 "type" : "drag" ,
506- "path" : [
507- {"x" : start_x , "y" : start_y },
508- {"x" : x , "y" : y },
509- ],
510+ "path" : path_points ,
510511 }
511512 action_type_str = "drag" # Normalize
512513 else :
@@ -566,7 +567,7 @@ def _convert_tool_use_to_agent_action(
566567 action_payload_dict = {
567568 "type" : "function" ,
568569 "name" : "goto" ,
569- "arguments" : { " url" : url } ,
570+ "arguments" : FunctionArguments ( url = url ) ,
570571 }
571572 action_type_str = "function"
572573 else :
@@ -579,7 +580,7 @@ def _convert_tool_use_to_agent_action(
579580 action_payload_dict = {
580581 "type" : "function" ,
581582 "name" : "navigate_back" ,
582- "arguments" : None ,
583+ "arguments" : FunctionArguments () ,
583584 }
584585 action_type_str = "function"
585586 else :
You can’t perform that action at this time.
0 commit comments