feat: 同步 WPF 版周计划功能,为刷理智任务添加每周执行日设置 - #94
Open
HosamaJJF wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Hey - 我在这里给出了一些高层次的反馈:
- 在
WeeklySchedule.isEnabled(for:)中,建议对超出范围的 weekday 值返回false而不是true,这样当weekday计算错误时,可以以“失败关闭”的方式处理。 - 在
startTasks()中,由于周计划导致跳过战斗任务时的日志消息中,可以包含任务名称或配置的 weekday,以便更容易调试为什么某个特定任务被跳过。
给 AI Agents 的提示
Please address the comments from this code review:
## Overall Comments
- In `WeeklySchedule.isEnabled(for:)`, consider returning `false` for out-of-range weekday values instead of `true` to fail closed if `weekday` is ever miscomputed.
- In `startTasks()`, the log message for skipping a fight task due to the weekly schedule could include the task’s name or configured weekday to make it easier to debug why a specific task was skipped.帮我变得更有用!请对每条评论点 👍 或 👎,我会根据这些反馈来改进对你的代码评审。
Original comment in English
Hey - I've left some high level feedback:
- In
WeeklySchedule.isEnabled(for:), consider returningfalsefor out-of-range weekday values instead oftrueto fail closed ifweekdayis ever miscomputed. - In
startTasks(), the log message for skipping a fight task due to the weekly schedule could include the task’s name or configured weekday to make it easier to debug why a specific task was skipped.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `WeeklySchedule.isEnabled(for:)`, consider returning `false` for out-of-range weekday values instead of `true` to fail closed if `weekday` is ever miscomputed.
- In `startTasks()`, the log message for skipping a fight task due to the weekly schedule could include the task’s name or configured weekday to make it easier to debug why a specific task was skipped.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
在 macOS GUI 的刷理智任务设置中新增周计划选项,与 WPF 版本行为一致。 用户可启用周计划并选择每周哪几天执行该任务,非启用日自动跳过并记录日志。 星期按游戏时间计算(每日 4:00 刷新),根据设置中的游戏区服自动适配时区。 - FightConfiguration: 新增 WeeklySchedule 结构体及 useWeeklySchedule、weeklySchedule 属性 - FightSettingsView: 新增周计划设置区域(主开关 + 7 天勾选 + 提示文字) - MAAViewModel: 新增 inGameDayOfWeek 游戏星期计算及 startTasks() 跳过逻辑 - LegacyConfigurations: 旧配置迁移路径初始化新字段 - Localizable.xcstrings: 新增中/英/日/韩/繁翻译
HosamaJJF
force-pushed
the
feat/weekly-schedule
branch
from
June 8, 2026 01:23
cb97b25 to
62c9c61
Compare
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.
在 mac 版 GUI 的刷理智任务设置中新增周计划选项,与 WPF 版本行为一致。
修改内容
涉及文件
FightConfiguration.swift— 新增 WeeklySchedule 结构体及 useWeeklySchedule / weeklySchedule 属性FightSettingsView.swift— 新增周计划设置区域(开关 + 7 天勾选 + 提示文字)MAAViewModel.swift— 新增 inGameDayOfWeek 游戏星期计算及 startTasks() 跳过逻辑LegacyConfigurations.swift— 旧配置迁移路径初始化新字段Localizable.xcstrings— 新增中/英/日/韩/繁翻译截图
1. 设置界面未勾选周计划选项
2. 设置界面勾选周计划选项
3. 日志界面
测试
Summary by Sourcery
在 macOS 图形界面中为自动刷理智(auto fight / 理智刷)任务添加可配置的每周计划,并在派遣任务时遵守游戏内的工作日规则。
New Features:
Enhancements:
Original summary in English
Summary by Sourcery
Add configurable weekly schedules to auto fight (理智刷) tasks in the macOS GUI and honor in-game weekday rules when dispatching tasks.
New Features:
Enhancements: