Merged
Conversation
added 6 commits
March 3, 2026 02:24
solve conflicts
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些高层次的反馈:
- 考虑在
parseParam中对Steps输入做更严格的校验(例如:t值非负且单调递增、Action/Key值必须在允许范围内),这样可以在发送任意按键事件之前就让格式错误的录制尽早失败。 - 目前回放循环在调用
PostKeyDown/PostKeyUp().Wait()时没有检查错误或超时;如果控制器调用失败或卡住,这可能会阻塞任务,所以建议在这些等待操作外层增加错误处理或超时机制,以提升回放的健壮性。 - 由于
releaseAll目前是把 W/A 写死在代码里,可能更安全的做法是要么从keyNameToCode中动态推导需要释放的按键,要么强制只允许这两个键,以避免将来增加更多键时出现不一致。
给 AI Agents 的提示
Please address the comments from this code review:
## Overall Comments
- Consider validating the `Steps` input more strictly in `parseParam` (e.g., non-negative and monotonically increasing `t` values, allowed `Action`/`Key` values) so that malformed recordings fail fast before any key events are sent.
- Right now the replay loop calls `PostKeyDown`/`PostKeyUp().Wait()` without checking for errors or timeouts; if the controller call fails or hangs, this could block the task, so adding error handling or a timeout around these waits would make the replay more robust.
- Since `releaseAll` is hardcoded to W/A, it might be safer to either derive the keys to release dynamically from `keyNameToCode` or to enforce that only those keys are allowed, to avoid inconsistencies if more keys are added later.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English
Hey - I've left some high level feedback:
- Consider validating the
Stepsinput more strictly inparseParam(e.g., non-negative and monotonically increasingtvalues, allowedAction/Keyvalues) so that malformed recordings fail fast before any key events are sent. - Right now the replay loop calls
PostKeyDown/PostKeyUp().Wait()without checking for errors or timeouts; if the controller call fails or hangs, this could block the task, so adding error handling or a timeout around these waits would make the replay more robust. - Since
releaseAllis hardcoded to W/A, it might be safer to either derive the keys to release dynamically fromkeyNameToCodeor to enforce that only those keys are allowed, to avoid inconsistencies if more keys are added later.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider validating the `Steps` input more strictly in `parseParam` (e.g., non-negative and monotonically increasing `t` values, allowed `Action`/`Key` values) so that malformed recordings fail fast before any key events are sent.
- Right now the replay loop calls `PostKeyDown`/`PostKeyUp().Wait()` without checking for errors or timeouts; if the controller call fails or hangs, this could block the task, so adding error handling or a timeout around these waits would make the replay more robust.
- Since `releaseAll` is hardcoded to W/A, it might be safer to either derive the keys to release dynamically from `keyNameToCode` or to enforce that only those keys are allowed, to avoid inconsistencies if more keys are added later.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
MistEO
reviewed
Mar 4, 2026
Contributor
MistEO
left a comment
There was a problem hiding this comment.
pipeline 里 mpe 的配置请删一下(设置里选择分离导出或者不导出)
然后 submodule 要更新一下
git submodule update --init
MistEO
reviewed
Mar 4, 2026
added 6 commits
March 7, 2026 13:20
Contributor
Author
|
@MistEO |
Contributor
|
预制操作 在各不相同的用户电脑上一定是更不稳定的,我几乎可以打包票。 不过我们也可以先合进去看看用户反馈,万一呢() |
MistEO
reviewed
Mar 7, 2026
isHarryh
approved these changes
Mar 7, 2026
| "type": "OCR" | ||
| } | ||
| }, | ||
| "GiftOperatorShiftToRunMapTracker": { |
Member
There was a problem hiding this comment.
目前无需在调用 MapTrackerMove 之前手动恢复跑步:MapTrackerMove 会自动处理走-跑切换。
Contributor
Author
There was a problem hiding this comment.
那这个要改吗
不用吧,我预制跑步得用这个,后面可以把MapTracker的去了
…GiftOperator) Made-with: Cursor
MistEO
pushed a commit
that referenced
this pull request
Mar 9, 2026
Co-authored-by: krau2k <yp2k@qq.com>
MistEO
pushed a commit
that referenced
this pull request
Mar 9, 2026
Co-authored-by: krau2k <yp2k@qq.com>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新增
任务 GiftOperator(赠送干员礼物):从帝江号舰桥前往干员联络台,自动与干员交互、赠送/领取礼物
任务选项 GiftOperatorMoveMode:支持「预制操作」和「识别寻路(MapTracker)」两种移动方式
Pipeline 流程:assets/resource/pipeline/GiftOperator.json,包含寻路、交互、送礼/领礼、重试等节点
任务配置:assets/tasks/GiftOperator.json,定义任务入口和选项
修改
agent/go-service/register.go:删除 input-replay 相关导入与注册
assets/misc/locales/*.json:补充 GiftOperator 任务和 GiftOperatorMoveMode 选项的本地化
删除
agent/go-service/input-replay/:整个 input-replay 包移除,改为用 Pipeline 的 LongPressKey + post_delay 实现录制逻辑
技术说明
两种移动路线前都会按 Shift 恢复跑步模式并等待约 500ms
部分节点配置 on_error -> GiftOperatorRetryCleanupAlt,失败时自动清理 Alt 并重试
GiftOperator 需要 Win32-Front 控制器,建议优先使用「预制操作」模式