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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
config.yaml
*/*.pyc
__pycache__/
tmp_screenshot
output/
running_log
Expand Down
19 changes: 13 additions & 6 deletions copilot_front_end/mobile_action_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,9 @@ def act_on_device(device_id, action, print_command = False, refush_app = True, d
adb_command += f' shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -keyboard "{text}"'

elif action['action_type'] == "Pop":
pass
if print_command:
print("Pop action received; no device command executed.")
return

elif action['action_type'] == "Wait":
wait_time = action['args']['duration']
Expand Down Expand Up @@ -598,13 +600,18 @@ def act_on_device(device_id, action, print_command = False, refush_app = True, d
adb_command += f" shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -touch {point[0]} {point[1]} 2000"

elif action['action_type'] == "Abort":

pass
if print_command:
abort_reason = action.get('args', {}).get('abort_reason')
if abort_reason:
print(f"Abort action received: {abort_reason}")
else:
print("Abort action received.")
return

elif action['action_type'] == "Complete":

pass

if print_command:
print("Complete action received.")
return

else:
raise ValueError(f"Invalid action type: {action['action_type']}")
Expand Down