Skip to content

Conversation

@Bolajiadesina
Copy link

@Bolajiadesina Bolajiadesina commented Dec 17, 2025

摘要

此 PR 修复了 copilot_front_end/mobile_action_helper.py,使前端动作类型 PopAbortComplete 不再发生贯穿(fall through)并尝试执行不完整的 adb 命令。

问题

此前,act_on_device() 对这些动作类型仅使用 pass 处理,随后仍会继续进入公共执行逻辑并运行 subprocess.run(adb_command, ...)。此时 adb_command 可能仅为 adb / adb -s <device>(没有子命令),从而导致静默失败并引发令人困惑的行为。

变更

  • Pop:提前返回(可选记录日志),不执行设备命令。
  • Abort:提前返回,并在可用时记录 abort_reason
  • Complete:提前返回(可选记录日志),不执行设备命令。
  • 同时在 .gitignore 中忽略 __pycache__/,避免本地运行时产生意外的未跟踪噪音文件。

测试

  • 本地导入冒烟测试:python -c "import copilot_front_end.mobile_action_helper as m; print('ok')"

@summonerloong summonerloong force-pushed the main branch 4 times, most recently from f3b25b4 to 48a2a84 Compare December 19, 2025 02:55
@Bolajiadesina
Copy link
Author

@summonerloong
请您有空的时候帮忙审核一下这个 PR,可以吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant