MCPcopy Create free account
hub / github.com/zai-org/Open-AutoGLM / _get_handler

Method _get_handler

phone_agent/actions/handler_ios.py:98–116  ·  view source on GitHub ↗

Get the handler method for an action.

(self, action_name: str)

Source from the content-addressed store, hash-verified

96 )
97
98 def _get_handler(self, action_name: str) -> Callable | None:
99 """Get the handler method for an action."""
100 handlers = {
101 "Launch": self._handle_launch,
102 "Tap": self._handle_tap,
103 "Type": self._handle_type,
104 "Type_Name": self._handle_type,
105 "Swipe": self._handle_swipe,
106 "Back": self._handle_back,
107 "Home": self._handle_home,
108 "Double Tap": self._handle_double_tap,
109 "Long Press": self._handle_long_press,
110 "Wait": self._handle_wait,
111 "Take_over": self._handle_takeover,
112 "Note": self._handle_note,
113 "Call_API": self._handle_call_api,
114 "Interact": self._handle_interact,
115 }
116 return handlers.get(action_name)
117
118 def _convert_relative_to_absolute(
119 self, element: list[int], screen_width: int, screen_height: int

Callers 1

executeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected