Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/askui/models/anthropic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
def extract_click_coordinates(text: str) -> tuple[int, int]:
pattern = r"<click>(\d+),\s*(\d+)"
matches = re.findall(pattern, text)
if not matches:
msg = f"No click coordinates found in text: {text}"
raise ValueError(msg)
x, y = matches[-1]
return int(x), int(y)
4 changes: 2 additions & 2 deletions src/askui/tools/android/ppadb_agent_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def _get_selected_device(self) -> AndroidDevice:
devices: list[AndroidDevice] = self._get_connected_devices()

if not self._device:
msg = "No device is selected, did you call on of the set_device methods?"
msg = "No device is selected, did you call one of the set_device methods?"
raise AndroidAgentOsError(msg)

for device in devices:
Expand All @@ -447,7 +447,7 @@ def _get_selected_device(self) -> AndroidDevice:

def _check_if_display_is_selected(self) -> None:
if self._selected_display is None:
msg = "No display is selected, did you call on of the set_display methods?"
msg = "No display is selected, did you call one of the set_display methods?"
raise AndroidAgentOsError(msg)

def _get_connected_devices(self) -> list[AndroidDevice]:
Expand Down