Compare commits

...

1127 Commits

Author SHA1 Message Date
uye
174a1b882d Release v6.2.2 (#15410) 2026-01-17 18:43:34 +08:00
github-actions[bot]
0fbed82550 docs: Auto Update Changelogs of v6.2.2 (#15418)
* docs: Auto Generate Changelog of Release v6.2.2

* docs: changelog

* docs: changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-17 18:43:16 +08:00
萨拉托加
954e9ad61f fix: 界园指挥避战刷钱黑屏等待 2026-01-17 18:10:11 +08:00
uye
fa9f443bcf fix: 怎么把成就注释掉了 2026-01-17 18:05:33 +08:00
uye
23f59ed2c9 chore: 快捷置入显示加点判断日志 2026-01-17 17:50:46 +08:00
status102
cb3dd38f23 perf: 悬浮窗改static 2026-01-17 11:30:57 +08:00
github-actions[bot]
6c4819e909 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/21082012091
[skip changelog]
2026-01-16 21:52:56 +00:00
uye
0d21d3b909 chore: 力竭了 2026-01-17 02:00:08 +08:00
uye
b34c5f6909 feat: 只有一个配置时标题栏隐藏配置名 2026-01-17 01:29:24 +08:00
Constrat
9e1e7dc2e4 i18n: EN tweak to inventory display 2026-01-16 18:27:22 +01:00
Constrat
c3046c6411 fix: phantom puppet not deploying 2026-01-16 18:17:27 +01:00
Constrat
e5b6ba5888 fix: AT ClickStage t -> T 2026-01-16 18:03:41 +01:00
Constrat
2c67e23334 chore: AT updates 2026-01-16 17:06:00 +01:00
uye
ed08eb3d78 feat: 检查更新失败时吐司通知 2026-01-16 23:47:34 +08:00
github-actions[bot]
44b2d4d1f7 chore: Auto Update Game Resources - 2026-01-16
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/21072180793

[skip changelog]
2026-01-16 15:46:14 +00:00
uye
98758bfbec chore: 抽卡任务结束后提示还原为默认 2026-01-16 22:45:28 +08:00
uye
243e89d948 fix: 牛牛抽卡点击停止之后文字提示不会停止变化 2026-01-16 22:44:50 +08:00
uye
4ec68ce699 feat: 一图流上报 id 单独实现 2026-01-16 19:08:55 +08:00
github-actions[bot]
91ef092905 chore: Auto Update Game Resources - 2026-01-16
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/21061982270

[skip changelog]
2026-01-16 09:30:41 +00:00
github-actions[bot]
a46f17774c chore: Auto Templates Optimization
Triggered by 3943bb0d46

[skip changelog]
2026-01-16 09:17:29 +00:00
Manicsteiner
3943bb0d46 chore: YostarJP AT updates 2026-01-16 17:16:55 +08:00
HX3N
99294b9f67 chore: YostarKR AT updates
MiniGame, navigation, ocr edit
2026-01-16 17:30:14 +09:00
github-actions[bot]
b5eb6f2b19 chore: Auto Update Game Resources - 2026-01-16
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/21059831385

[skip changelog]
2026-01-16 08:05:15 +00:00
github-actions[bot]
c6c844626a chore: Auto Update Game Resources - 2026-01-16
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/21059079979

[skip changelog]
2026-01-16 07:29:37 +00:00
Constrat
b50eb305eb chore: Preload AT + new alter operators regex for EN 2026-01-15 15:19:16 +01:00
Manicsteiner
3e114a4d60 chore: YostarJP AT preload and ocr edit 2026-01-15 22:08:28 +08:00
萨拉托加
1d6c99f77c fix: 萨米肉鸽StartAction 2026-01-15 20:09:40 +08:00
萨拉托加
feffd27a35 fix: 矿石“杀手”识别 2026-01-15 18:17:34 +08:00
萨拉托加
0ba193f895 fix: 肉鸽增加黑屏等待时间 2026-01-15 17:53:54 +08:00
uye
d6fa6c87b7 chore: 下调一点仓库识别二值化阈值 2026-01-15 02:39:17 +08:00
github-actions[bot]
61614b8a6f chore: Auto Update Game Resources - 2026-01-14
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/21000893301

[skip changelog]
2026-01-14 16:05:05 +00:00
Constrat
6fe58eeceb chore: update OrundumActivities for EN 2026-01-14 17:01:52 +01:00
status102
349ea1078c fix: 悖论模拟-作业列表 额外等待 2026-01-14 17:32:32 +08:00
github-actions[bot]
8acbcaae11 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20973892195
[skip changelog]
2026-01-13 21:53:12 +00:00
github-actions[bot]
af2e1879fb chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20972531014
[skip changelog]
2026-01-13 21:05:11 +00:00
uye
bf0f555233 fix: build warring 2026-01-14 02:28:05 +08:00
uye
78f0adf0a4 fix: 仓库数据 parse 失败时返回空数据 2026-01-14 01:11:03 +08:00
uye
cf1f7ba5f5 rft: 调整 ViewModels 目录结构,规范 ViewModels 命名 (#15389)
* rft: 调整 ViewModels 目录结构,规范 ViewModels 命名

* rft: 统一 Views 结构

* rft: rename AnnouncementDialogViewModel

* rft: 漏网之鱼

* rft: 怎么还有

* rft: 统一命名

* rft: 重命名

* rft: 重命名

* style: 格式化
2026-01-14 00:27:56 +08:00
uye
7369c28a1e docs: 更新开发指南 2026-01-13 21:53:10 +08:00
github-actions[bot]
73badc0a67 chore: Auto Templates Optimization
Triggered by f6d5887229

[skip changelog]
2026-01-13 11:52:21 +00:00
萨拉托加
f6d5887229 fix: 肉鸽快速编队按钮边缘无法点击导致出错 2026-01-13 19:12:06 +08:00
drway
92f22ec499 chore: 制造站加入苍苔组,避免苍苔与阿罗玛冲突 (#15343)
feat: 基建制造站加入苍苔组逻辑

如果单纯按一般逻辑筛选,会导致阿罗玛和苍苔同时使用,亏苍苔加成。
故单独加入苍苔组逻辑,避免同时选中苍苔和阿罗玛(以及未来可能会出现的其他非金属工艺的赤金制造加成干员)
2026-01-13 17:04:37 +08:00
github-actions[bot]
a20f0f684f feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20936269722
[skip changelog]
2026-01-12 21:53:00 +00:00
github-actions[bot]
16f5331dc3 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20934921302
[skip changelog]
2026-01-12 21:05:14 +00:00
uye
71b2186dc6 perf: 优化动画效果 2026-01-13 03:03:39 +08:00
CH4
0c35daa458 fix: 修复了特殊路径下执行adb命令可能失败的问题(#15381) (#15382)
fix: 修复了特殊路径下执行adb命令可能失败的问题
2026-01-13 02:00:07 +08:00
uye
1dabdd4043 feat: 新增截图增强模拟器路径的选择窗口 2026-01-13 00:40:56 +08:00
github-actions[bot]
0a3ee5676e chore: Auto Update Game Resources - 2026-01-12
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20912072352

[skip changelog]
2026-01-12 08:05:20 +00:00
github-actions[bot]
c2ec6e0c0a chore: Auto Update Game Resources - 2026-01-12
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20910590766

[skip changelog]
2026-01-12 06:55:17 +00:00
Status102
7438df5ada feat: 自动战斗-自动编队支持技能等级要求 (#15355)
* feat: 自动战斗-自动编队支持技能等级要求

* fix: unused

* perf: 合并上报

* fix: 滑动任务

* fix: 修改一下点击位置
2026-01-12 14:45:11 +08:00
Status102
a58c0c55d9 chore: 地块类型标注 TileType (#15373)
* chore: 地块类型标注 TileType

* chore: tile

* style: format
2026-01-12 11:01:30 +08:00
github-actions[bot]
0f05a95c82 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20902460196
[skip changelog]
2026-01-11 21:53:16 +00:00
github-actions[bot]
c27a79da36 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20901826616
[skip changelog]
2026-01-11 21:04:29 +00:00
dantmnf
26880c62c7 fix: add AsstGetImageBgr to wine shim 2026-01-12 01:24:15 +08:00
雪银星月
61d26fbe26 fix: 修复 TaskDialog 按钮文本赋值时的语法错误及空引用保护 (#15377)
修复了在赋值语句左侧使用 ?. 导致的代码无效/编译错误问题
2026-01-11 23:45:24 +08:00
uye
eee6c64d23 chore: 收到关卡名识别失败回调时更新卡片 2026-01-11 23:04:02 +08:00
uye
363da5be9d feat: 设置指引中添加使用指引页 2026-01-11 20:16:59 +08:00
Goat Boring(山羊博宁88)
f5ce1e8728 docs: Update cli usage.md with Windows installation note (#15369) 2026-01-11 19:47:22 +08:00
uye
656e774366 Release v6.2.1 (#15366)
## Summary by Sourcery

准备发布 6.2.1 补丁版本,包含稳定性改进、简化的错误日志记录,以及更新的 UI/本地化资源。

Bug 修复:
- 防止 copilot 文件弹窗在失去焦点后立即再次被切换显示。
- 确保在打开调试文件夹前先创建该文件夹,并在失败时进行合理的错误报告。
- 在生成支持负载(support payload)后,改为打开报告文件夹而不是调试文件夹。
- 在与 Paradox 相关的任务中加载 copilot 配置时,使用正确的文件系统路径类型。

增强功能:
- 通过移除堆栈跟踪捕获和崩溃文件生成来简化 Windows 未处理异常的日志记录,并删除现已未使用的
`ExceptionStacktrace` 工具类。
- 刷新各语言中与公告、copilot 视图、任务以及本地化相关的多种资源。

文档:
- 更新所有支持语言中的 FAQ 链接,使其指向正确的 Visual C++ Redistributable 安装程序 URL。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare the 6.2.1 patch release with stability improvements, simplified
error logging, and updated UI/localization resources.

Bug Fixes:
- Prevent the copilot file popup from being immediately re-toggled after
losing focus.
- Ensure the debug folder is created before opening it and gracefully
report failures.
- After generating a support payload, open the reports folder instead of
the debug folder.
- Use the correct filesystem path type when loading copilot
configurations in Paradox-related tasks.

Enhancements:
- Simplify Windows unhandled-exception logging by removing stack-trace
capture and crash file generation, and delete the now-unused
ExceptionStacktrace utility.
- Refresh various announcement, copilot view, task, and localization
resources across supported languages.

Documentation:
- Update FAQ links in all supported languages to point to the correct
Visual C++ Redistributable installer URL.

</details>

Bug 修复:
- 防止在 copilot 文件弹窗失去焦点后立刻被意外再次切换。
- 确保在打开调试文件夹时,如果目录不存在则创建该目录,并能够优雅地处理失败情况。
- 在生成支持负载后,改为打开报告文件夹而不是调试文件夹。

增强改进:
- 简化未处理异常的日志记录逻辑,移除堆栈跟踪捕获及相关的崩溃文件输出。

文档:
- 更新所有已支持语言中的 FAQ 链接,使其指向正确的 Visual C++ Redistributable 安装程序。

日常维护:
- 移除未使用的 `ExceptionStacktrace` 工具头文件及其相关引用。
- 更新公告、copilot 视图和翻译等相关的各种 UI 和本地化资源。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

准备发布 6.2.1 补丁版本,包含稳定性改进、简化的错误日志记录,以及更新的 UI/本地化资源。

Bug 修复:
- 防止 copilot 文件弹窗在失去焦点后立即再次被切换显示。
- 确保在打开调试文件夹前先创建该文件夹,并在失败时进行合理的错误报告。
- 在生成支持负载(support payload)后,改为打开报告文件夹而不是调试文件夹。
- 在与 Paradox 相关的任务中加载 copilot 配置时,使用正确的文件系统路径类型。

增强功能:
- 通过移除堆栈跟踪捕获和崩溃文件生成来简化 Windows 未处理异常的日志记录,并删除现已未使用的
`ExceptionStacktrace` 工具类。
- 刷新各语言中与公告、copilot 视图、任务以及本地化相关的多种资源。

文档:
- 更新所有支持语言中的 FAQ 链接,使其指向正确的 Visual C++ Redistributable 安装程序 URL。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare the 6.2.1 patch release with stability improvements, simplified
error logging, and updated UI/localization resources.

Bug Fixes:
- Prevent the copilot file popup from being immediately re-toggled after
losing focus.
- Ensure the debug folder is created before opening it and gracefully
report failures.
- After generating a support payload, open the reports folder instead of
the debug folder.
- Use the correct filesystem path type when loading copilot
configurations in Paradox-related tasks.

Enhancements:
- Simplify Windows unhandled-exception logging by removing stack-trace
capture and crash file generation, and delete the now-unused
ExceptionStacktrace utility.
- Refresh various announcement, copilot view, task, and localization
resources across supported languages.

Documentation:
- Update FAQ links in all supported languages to point to the correct
Visual C++ Redistributable installer URL.

</details>

</details>
2026-01-11 19:08:59 +08:00
uye
1e58932ea8 docs: Update CHANGELOG for version 6.2.0
Added multiple improvements and fixes related to game mechanics and user interface.
2026-01-11 19:05:01 +08:00
uye
7c7916aa95 chore: 调整战斗结束后的点击位置 2026-01-11 19:03:26 +08:00
uye
17b7b16069 fix: 将借助战打 OF-1 的任务结束后最大等待时间翻倍,避免延长的黑屏时间影响 2026-01-11 18:44:50 +08:00
Status102
eb85bf2f36 feat: 自动检测地图是否为多阶段地图, 判断是否需要使用 view[0].x 修正镜头 (#15371) 2026-01-11 18:38:58 +08:00
uye
efc4a57d74 fix: 增加理智战斗后点击到掉落列表的重试次数,避免延长的黑屏时间影响 2026-01-11 18:23:32 +08:00
uye
10c4b2d8ef fix: 游戏更新后结算黑屏时长大幅增加,导致肉鸽结算失败 2026-01-11 18:17:04 +08:00
uye
aa3830ee91 docs: changelog 2026-01-11 16:54:56 +08:00
github-actions[bot]
ff11dfc080 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20892349945
[skip changelog]
2026-01-11 08:42:35 +00:00
uye
f590bffcbf fix: 肉鸽推荐设置文本 (#15370)
* fix: 肉鸽推荐设置文本

* fix: MAX

* fix: 忘了加上没解锁的情况

* fix: 空格

* fix: 优化细节

* fix: 优化细节

* i18n: 更新翻译

---------

Co-authored-by: 萨拉托加 <151550168+Saratoga-Official@users.noreply.github.com>
2026-01-11 16:41:38 +08:00
status102
ad76ab4956 fix: 自动战斗-悖论模拟 中文路径作业 解析作业失败 2026-01-11 16:34:01 +08:00
status102
e4ece2cff0 fix: unused 2026-01-11 16:33:57 +08:00
uye
4980fa1e8c perf: 优化下拉框逻辑 2026-01-11 15:47:05 +08:00
萨拉托加
e7d83dda91 fix: 肉鸽误点进招募界面
fix #15356
2026-01-11 09:48:43 +08:00
status102
921de77f9b fix: 移除 ExceptionStacktrace.hpp 2026-01-11 08:51:59 +08:00
github-actions[bot]
ea085c600d chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20884343514
[skip changelog]
2026-01-10 21:04:06 +00:00
uye
54569e636e feat: 公告界面触屏滚动 2026-01-11 03:46:48 +08:00
uye
6a06789ece feat: 拆分 debug 和 report 文件夹逻辑 2026-01-11 03:25:32 +08:00
uye
47f1d0c939 i18n: 悖论模拟自动战斗任务翻译 2026-01-11 01:49:08 +08:00
uye
4230d695e7 perf: 用妖法实现了自动战斗下拉框的失焦和收起按钮 2026-01-11 00:40:37 +08:00
wryx166
f65cb918eb docs: 更新 Visual C++ 可再发行程序包链接至 V14 版本 (#15360) 2026-01-10 23:59:16 +08:00
uye
d276eea233 fix: 收取好友线索延迟 2026-01-10 23:21:12 +08:00
uye
c54dd5450b Release v6.2.0 (#15346)
![f1467ea7b0b749744834e653cab7dff3](https://github.com/user-attachments/assets/c69fb771-a2ba-4bf0-ba3b-892016f5fd35)

## Summary by Sourcery

发布 v6.2.0,带来重新设计的日志侧边栏、扩展的自动战斗与基建管理选项、新成就系统,以及多项稳定性与用户体验改进。

新功能:
- 新增成就 DLC 系统,覆盖更多游戏玩法场景。
- 增强打手(copilot)任务选择功能,支持多级路径、相对目录以及本地任务折叠。
- 在基建管理中新增情报交换与情报发送的独立开关。
- 为冬灵寒脊主题新增基建配置,并调整相关干员选择逻辑。
- 新增 Gotify 通知渠道,并为 Bark 通知设置默认分类。
- 重新设计主页日志侧边栏,提供可切换的视觉样式、缩略图以及改进后的布局。
- 在今日开放关卡提示中显示仓库剩余数量,并将库存更新提示移至工具提示中。
- 限制基于 CPU 的推理线程使用,以优先保障模拟器性能。
- 当从临时路径运行时阻止应用启动,并保护非空的企鹅物流 ID 不被覆盖。
- 新增 Roguelike 主题推荐提示,支持多语言,并为新侧故事加入导航。
- 在 macOS 上禁用基于 CoreML 的检测与识别。

问题修复:
- 修复由于 2026-01-09 游戏更新及 Roguelike 暂停按钮位置调整导致的打手(copilot)运行失败问题。
- 解决打手任务清理异常,以及通过输入框特殊代码启动关卡时的相关问题。
- 修正情报数量识别,以及在情报已在展示板上时的一键放置逻辑。
- 提升对“隐秘战线”(Hidden Crimes)事件与结局的识别,包括对多余字符的处理。
- 防止在同时启用剿灭与备选关卡选项时企鹅物流报表 ID 被修改。
- 解决基建效率计算中的 out_of_range 错误以及远程控制截图残留问题。
- 修复文档站搜索、不同语言环境下掉落数量识别错误,以及多处命名和措辞问题。
- 修复调试图像路径、过长文件名以及 waydroid 截图行为相关问题。
- 更新若干素材与样式警告,包括 DormMini.png 以及 SA1518/SA1633 分析器警告。

优化增强:
- 优化打手(copilot)标签结构,包括将悖论模拟关卡单独分组。
- 当指定的刷理智次数与理智加成倍数设置冲突时给出警告。
- 改进情报交换、好友情报领取以及一键赠送情报的逻辑,减少误操作。
- 打磨 UI 布局、换行、工具提示以及缩略图行为与展示时机。
- 重构并简化属性依赖辅助工具为静态工具类,并使文件命名与目录结构保持一致。
- 将开发容器从 conda 迁移到基于 mise/uv 的环境,并在适当位置将 DPS 更名为 OPS。

文档:
- 为 `maa-cli` 添加一键脚本安装说明,并更新韩文文档与 VS Code 扩展使用指南。
- 统一中文整合文档的格式,并刷新源码链接以对应最新行号。
- 在战斗协议文档中补充摄像头移动相关说明。

日常维护:
- 调整文件夹检测逻辑、注释、默认日志缩略图数量限制以及公告按钮的位置。
- 移除冗余关卡,迁移 API 变更,并补充调试阶段的 GPU 使用说明。
- 更新多地区的 OCR 配置与应用内英文提示文案。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Release v6.2.0 with a redesigned log sidebar, expanded automation and
base management options, new achievements, and multiple stability and UX
improvements.

New Features:
- Add an achievement DLC system covering additional gameplay scenarios.
- Enhance copilot task selection with multi-level paths, relative
directories, and local task collapsing.
- Introduce independent toggles for clue exchange and sending clues in
Base management.
- Add new Base configurations for the Winterwisp set and adjust related
operator selection logic.
- Add Gotify as a new notification channel and set a default category
for Bark notifications.
- Redesign the home log sidebar with switchable visual styles,
thumbnails, and improved layout.
- Display depot quantities in today’s open stages hints and move
inventory update prompts to tooltips.
- Limit CPU-based inference thread usage to prioritize emulator
performance.
- Block application startup when running from a temporary path and
protect non-empty Penguin Logistics IDs from being overwritten.
- Add new roguelike theme recommendation tips with multi-language
support and navigation for the new side story.
- Disable CoreML-based detection and recognition on macOS.

Bug Fixes:
- Fix copilot failures caused by the 2026-01-09 game update and updated
roguelike pause button position.
- Resolve issues with copilot job clearing and starting runs via special
codes from the input box.
- Correct clue count recognition and one-click clue placement when clues
are already on the board.
- Improve recognition for Hidden Crimes events and endings, including
handling of extra characters.
- Prevent changes to Penguin Logistics report IDs when Annihilation and
backup stage options are both enabled.
- Address out_of_range errors in Base efficiency calculations and stale
screenshots in remote control capture.
- Fix documentation site search, locale-specific drop count misreads,
and various naming and wording issues.
- Resolve issues with debug image paths, overly long filenames, and
waydroid screencap behavior.
- Update assorted assets and style warnings, including DormMini.png and
SA1518/SA1633 analyzer warnings.

Enhancements:
- Refine copilot tab structure, including separating paradox simulation
stages.
- Warn when specified sanity-farming run counts conflict with sanity
multiplier settings.
- Improve logic for clue exchange, friend clue retrieval, and one-click
clue sending to reduce mis-operations.
- Polish UI layouts, wrapping, tooltips, and thumbnail behavior and
timing.
- Refactor and simplify property dependency helpers into a static
utility and align file naming with structure.
- Migrate the development container from conda to a mise/uv-based setup
and rename DPS to OPS where appropriate.

Documentation:
- Document one-click maa-cli installation via scripts and update KR docs
and VS Code extension guides.
- Align Chinese integrated documentation formatting and refresh source
links to current line numbers.
- Expand battle protocol docs with camera movement instructions.

Chores:
- Tweak folder detection logic, comments, default log thumbnail limits,
and announcement button placement.
- Remove redundant stages, port API changes, and add debug-time GPU
usage notes.
- Update multiple region-specific OCR configurations and English strings
for in-app messages.

</details>
2026-01-10 21:07:55 +08:00
uye
8ac2b1bc58 docs: Update CHANGELOG for v6.2.0 release notes
Refactor the layout and visual style of the log sidebar on the homepage.
2026-01-10 21:04:12 +08:00
uye
8101f35923 docs: changelog 2026-01-10 21:03:14 +08:00
uye
20b317b07a feat: 重构仓库识别结构,支持根据关卡掉落情况自动更新 (#15358)
* feat: 重构仓库识别结构,支持根据关卡掉落情况自动更新

* feat: 上次同步时间

* chore: 使用 TryParseExact
2026-01-10 21:01:01 +08:00
status102
4a42d1142b fix: 移除地图未修复期间的临时糊屎, 移除未更正的注释
link to d0b594cdc0, ade38a68a0.
2026-01-10 18:02:30 +08:00
status102
ed2594b5c7 perf(core): ProcessTask 输出优化 2026-01-10 18:02:12 +08:00
萨拉托加
cca39cf410 fix: 界园肉鸽因点击模板边缘导致关卡进不去 (#15352)
* fix: 界园肉鸽因点击模板边缘导致关卡进不去

* fix: postDelay

上次改错了
2026-01-10 17:40:29 +08:00
status102
a14f7c3a3a chore: doc 2026-01-10 15:57:27 +08:00
AnnAngela
430c389a90 docs: Remove v6.2.0 section from CHANGELOG
Removed version v6.2.0 section from CHANGELOG.
2026-01-10 11:49:52 +08:00
AnnAngela
dcbd843534 docs: Update CHANGELOG.md
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2026-01-10 11:49:22 +08:00
萨拉托加
f3e0c6a527 chore: 添加雪猎基建技能加成
fix #15334
2026-01-10 08:56:49 +08:00
github-actions[bot]
279d9092a4 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20865488969
[skip changelog]
2026-01-09 21:04:51 +00:00
status102
d25edcbbbd fix: 游戏进入战斗关卡后, 暂停/恢复 按钮亮度在点击后发生变化 255 -> 245 2026-01-10 03:10:29 +08:00
uye
2751467878 docs: v6.2.0 2026-01-09 23:58:27 +08:00
uye
95bc306404 Release v6.2.0-beta.4 (#15339)
## Summary by Sourcery

发布 6.2.0 版本,对日志侧边栏进行了全新设计,扩展了 Copilot 和基建管理能力,并带来多项稳定性和用户体验改进。

New Features:
- 新增成就 DLC 系统,在多个关卡场景中加入全新成就。
- 增强 Copilot 任务文件选择功能,支持嵌套路径和相对目录,并改进任务下拉列表的分组方式。
- 在基建自动化设置中新增线索交换与线索发送的开关选项。
- 新增冬季基建分组配置调整,以及包括 Gotify 和默认 Bark 分类在内的通知选项。
- 重新设计首页日志侧边栏,支持切换视觉样式、日志缩略图,并加入悬浮日志窗口按钮。
- 在“今日可打关卡”提示中显示仓库库存数量,并将库存更新提示移动到工具提示(tooltip)中。
- 增加安全防护措施,例如限制 CPU 推理线程数、在调试模式下可选自动资源重载,以及在程序从临时目录运行时阻止启动。

Bug Fixes:
- 修复多个 Copilot 和关卡自动战斗问题,包括最新版游戏更新后导致的失败,以及通过输入框清除或开始任务时出现的问题。
- 解决线索识别与摆放问题,包括当线索已在棋盘上时的一键摆放,以及在某些选项组合下处理不正确的问题。
- 修复肉鸽和活动识别逻辑,包括隐藏结局识别、多余角色处理、干员可用性缺失以及受语言环境影响的掉落数量解析问题。
- 处理基础设施相关的 bug,例如基建效率计算异常、远程控制截图不刷新的问题,以及调试图像和文档搜索行为不正确的问题。
- 修正多处素材、文本与样式问题,包括关卡名拼写错误、警告清理,以及为特定语言环境更新图像资源。
- 确保 Copilot 任务在开始前会校验并设置受支持的关卡名称,并调整临时目录检测逻辑,以可靠地阻止在临时路径中运行。

Enhancements:
- 优化 Copilot 标签页逻辑,将悖论模拟任务拆分并改进相关警告与交互体验。
- 改进线索交换和好友线索获取逻辑,以及通用 UI 布局、换行、工具提示和缩略图行为。
- 重构依赖辅助工具及相关视图模型,调整缩略图工具提示延迟,并重命名文件以更好匹配项目结构。
- 微调公告对话框、日志缩略图数量上限及其他小型 UI 行为,以提升可用性。
- 将开发容器环境从 conda 迁移到基于 mise/uv 的方案,并在合适位置将 DPS 重命名为 OPS。

Documentation:
- 更新和扩充面向用户的文档,包括一键 CLI 安装、战斗协议中的镜头移动说明、中文集成格式、韩文(KR)文档,以及 VS Code 插件快速
OCR 使用说明。

Chores:
- 调整文件夹检测和注释,微调公告按钮位置,并为不同服务器和场景更新地图配置和 OCR 相关参数。
- 新增调试相关辅助内容,例如用于强制资源重载的 `IsDebugVersion` 标志,以及调试模式下 GPU 使用的注解。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Release version 6.2.0 with a redesigned log sidebar, expanded Copilot
and base management capabilities, and assorted stability and UX
improvements.

New Features:
- Add an achievement DLC system with new achievements across multiple
scenarios.
- Enhance Copilot task file selection to support nested paths and
relative directories, and improve the task dropdown grouping.
- Introduce toggles for conducting clue exchange and sending clues in
base automation settings.
- Add winter base group configuration adjustments and new notification
options including Gotify and default Bark categories.
- Redesign the home log sidebar with switchable visual styles, log
thumbnails, and a floating log window button.
- Display depot inventory counts in today’s open stages hints and move
inventory update tips into tooltips.
- Add safeguards such as limiting CPU inference threads, optional auto
resource reload in debug, and blocking startup when running from
temporary directories.

Bug Fixes:
- Fix multiple Copilot and stage automation issues, including failures
after the latest game update and problems clearing or starting tasks via
the input box.
- Resolve clue recognition and placement issues, including one-click
placement when clues are already on the board and incorrect handling
when certain options are combined.
- Fix roguelike and event recognition logic, including hidden ending
recognition, extra-character handling, missing operator availability,
and locale-dependent drop count parsing.
- Address infrastructure-related bugs such as base efficiency
calculation exceptions, remote control screenshots not updating, and
incorrect debug image and document search behavior.
- Correct various assets, strings, and style issues, including stage
name typos, warning cleanups, and updated images for specific locales.
- Ensure Copilot tasks validate and set supported stage names before
starting, and adjust temp directory detection logic to reliably block
running from temporary paths.

Enhancements:
- Refine Copilot tab logic by splitting paradox simulation tasks and
improving related warnings and UX.
- Improve clue exchange and friend clue retrieval logic and general UI
layout, wrapping, tooltips, and thumbnail behavior.
- Refactor dependency helper utilities and related view models, adjust
thumbnail tooltip delays, and rename files to better match the project
structure.
- Tweak announcement dialogs, log thumbnail limits, and other small UI
behaviors for better usability.
- Migrate the development container environment from conda to a
mise/uv-based setup and rename DPS to OPS where appropriate.

Documentation:
- Update and expand user-facing documentation, including one-click CLI
installation, battle protocol camera movement, Chinese integration
formatting, KR docs, and VS Code extension docs for quick OCR.

Chores:
- Adjust folder detection and comments, tune announcement button
positions, and update map configurations and OCR tweaks for various
servers and scenarios.
- Add debug-related helpers such as an IsDebugVersion flag for forced
resource reloads and annotations for GPU use under debugging.

</details>

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

发布 6.2.0 版本,对日志侧边栏进行了全新设计,扩展了 Copilot 和基建管理能力,并带来多项稳定性和用户体验改进。

New Features:
- 新增成就 DLC 系统,在多个关卡场景中加入全新成就。
- 增强 Copilot 任务文件选择功能,支持嵌套路径和相对目录,并改进任务下拉列表的分组方式。
- 在基建自动化设置中新增线索交换与线索发送的开关选项。
- 新增冬季基建分组配置调整,以及包括 Gotify 和默认 Bark 分类在内的通知选项。
- 重新设计首页日志侧边栏,支持切换视觉样式、日志缩略图,并加入悬浮日志窗口按钮。
- 在“今日可打关卡”提示中显示仓库库存数量,并将库存更新提示移动到工具提示(tooltip)中。
- 增加安全防护措施,例如限制 CPU 推理线程数、在调试模式下可选自动资源重载,以及在程序从临时目录运行时阻止启动。

Bug Fixes:
- 修复多个 Copilot 和关卡自动战斗问题,包括最新版游戏更新后导致的失败,以及通过输入框清除或开始任务时出现的问题。
- 解决线索识别与摆放问题,包括当线索已在棋盘上时的一键摆放,以及在某些选项组合下处理不正确的问题。
- 修复肉鸽和活动识别逻辑,包括隐藏结局识别、多余角色处理、干员可用性缺失以及受语言环境影响的掉落数量解析问题。
- 处理基础设施相关的 bug,例如基建效率计算异常、远程控制截图不刷新的问题,以及调试图像和文档搜索行为不正确的问题。
- 修正多处素材、文本与样式问题,包括关卡名拼写错误、警告清理,以及为特定语言环境更新图像资源。
- 确保 Copilot 任务在开始前会校验并设置受支持的关卡名称,并调整临时目录检测逻辑,以可靠地阻止在临时路径中运行。

Enhancements:
- 优化 Copilot 标签页逻辑,将悖论模拟任务拆分并改进相关警告与交互体验。
- 改进线索交换和好友线索获取逻辑,以及通用 UI 布局、换行、工具提示和缩略图行为。
- 重构依赖辅助工具及相关视图模型,调整缩略图工具提示延迟,并重命名文件以更好匹配项目结构。
- 微调公告对话框、日志缩略图数量上限及其他小型 UI 行为,以提升可用性。
- 将开发容器环境从 conda 迁移到基于 mise/uv 的方案,并在合适位置将 DPS 重命名为 OPS。

Documentation:
- 更新和扩充面向用户的文档,包括一键 CLI 安装、战斗协议中的镜头移动说明、中文集成格式、韩文(KR)文档,以及 VS Code 插件快速
OCR 使用说明。

Chores:
- 调整文件夹检测和注释,微调公告按钮位置,并为不同服务器和场景更新地图配置和 OCR 相关参数。
- 新增调试相关辅助内容,例如用于强制资源重载的 `IsDebugVersion` 标志,以及调试模式下 GPU 使用的注解。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Release version 6.2.0 with a redesigned log sidebar, expanded Copilot
and base management capabilities, and assorted stability and UX
improvements.

New Features:
- Add an achievement DLC system with new achievements across multiple
scenarios.
- Enhance Copilot task file selection to support nested paths and
relative directories, and improve the task dropdown grouping.
- Introduce toggles for conducting clue exchange and sending clues in
base automation settings.
- Add winter base group configuration adjustments and new notification
options including Gotify and default Bark categories.
- Redesign the home log sidebar with switchable visual styles, log
thumbnails, and a floating log window button.
- Display depot inventory counts in today’s open stages hints and move
inventory update tips into tooltips.
- Add safeguards such as limiting CPU inference threads, optional auto
resource reload in debug, and blocking startup when running from
temporary directories.

Bug Fixes:
- Fix multiple Copilot and stage automation issues, including failures
after the latest game update and problems clearing or starting tasks via
the input box.
- Resolve clue recognition and placement issues, including one-click
placement when clues are already on the board and incorrect handling
when certain options are combined.
- Fix roguelike and event recognition logic, including hidden ending
recognition, extra-character handling, missing operator availability,
and locale-dependent drop count parsing.
- Address infrastructure-related bugs such as base efficiency
calculation exceptions, remote control screenshots not updating, and
incorrect debug image and document search behavior.
- Correct various assets, strings, and style issues, including stage
name typos, warning cleanups, and updated images for specific locales.
- Ensure Copilot tasks validate and set supported stage names before
starting, and adjust temp directory detection logic to reliably block
running from temporary paths.

Enhancements:
- Refine Copilot tab logic by splitting paradox simulation tasks and
improving related warnings and UX.
- Improve clue exchange and friend clue retrieval logic and general UI
layout, wrapping, tooltips, and thumbnail behavior.
- Refactor dependency helper utilities and related view models, adjust
thumbnail tooltip delays, and rename files to better match the project
structure.
- Tweak announcement dialogs, log thumbnail limits, and other small UI
behaviors for better usability.
- Migrate the development container environment from conda to a
mise/uv-based setup and rename DPS to OPS where appropriate.

Documentation:
- Update and expand user-facing documentation, including one-click CLI
installation, battle protocol camera movement, Chinese integration
formatting, KR docs, and VS Code extension docs for quick OCR.

Chores:
- Adjust folder detection and comments, tune announcement button
positions, and update map configurations and OCR tweaks for various
servers and scenarios.
- Add debug-related helpers such as an IsDebugVersion flag for forced
resource reloads and annotations for GPU use under debugging.

</details>

</details>
- 修复
`IsRunningInTempDirectory`,通过确保当前路径和临时路径都包含一致的尾部分隔符并处理可替代的路径分隔符,从而正确识别临时目录位置。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

发布 6.2.0 版本,对日志侧边栏进行了全新设计,扩展了 Copilot 和基建管理能力,并带来多项稳定性和用户体验改进。

New Features:
- 新增成就 DLC 系统,在多个关卡场景中加入全新成就。
- 增强 Copilot 任务文件选择功能,支持嵌套路径和相对目录,并改进任务下拉列表的分组方式。
- 在基建自动化设置中新增线索交换与线索发送的开关选项。
- 新增冬季基建分组配置调整,以及包括 Gotify 和默认 Bark 分类在内的通知选项。
- 重新设计首页日志侧边栏,支持切换视觉样式、日志缩略图,并加入悬浮日志窗口按钮。
- 在“今日可打关卡”提示中显示仓库库存数量,并将库存更新提示移动到工具提示(tooltip)中。
- 增加安全防护措施,例如限制 CPU 推理线程数、在调试模式下可选自动资源重载,以及在程序从临时目录运行时阻止启动。

Bug Fixes:
- 修复多个 Copilot 和关卡自动战斗问题,包括最新版游戏更新后导致的失败,以及通过输入框清除或开始任务时出现的问题。
- 解决线索识别与摆放问题,包括当线索已在棋盘上时的一键摆放,以及在某些选项组合下处理不正确的问题。
- 修复肉鸽和活动识别逻辑,包括隐藏结局识别、多余角色处理、干员可用性缺失以及受语言环境影响的掉落数量解析问题。
- 处理基础设施相关的 bug,例如基建效率计算异常、远程控制截图不刷新的问题,以及调试图像和文档搜索行为不正确的问题。
- 修正多处素材、文本与样式问题,包括关卡名拼写错误、警告清理,以及为特定语言环境更新图像资源。
- 确保 Copilot 任务在开始前会校验并设置受支持的关卡名称,并调整临时目录检测逻辑,以可靠地阻止在临时路径中运行。

Enhancements:
- 优化 Copilot 标签页逻辑,将悖论模拟任务拆分并改进相关警告与交互体验。
- 改进线索交换和好友线索获取逻辑,以及通用 UI 布局、换行、工具提示和缩略图行为。
- 重构依赖辅助工具及相关视图模型,调整缩略图工具提示延迟,并重命名文件以更好匹配项目结构。
- 微调公告对话框、日志缩略图数量上限及其他小型 UI 行为,以提升可用性。
- 将开发容器环境从 conda 迁移到基于 mise/uv 的方案,并在合适位置将 DPS 重命名为 OPS。

Documentation:
- 更新和扩充面向用户的文档,包括一键 CLI 安装、战斗协议中的镜头移动说明、中文集成格式、韩文(KR)文档,以及 VS Code 插件快速
OCR 使用说明。

Chores:
- 调整文件夹检测和注释,微调公告按钮位置,并为不同服务器和场景更新地图配置和 OCR 相关参数。
- 新增调试相关辅助内容,例如用于强制资源重载的 `IsDebugVersion` 标志,以及调试模式下 GPU 使用的注解。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Release version 6.2.0 with a redesigned log sidebar, expanded Copilot
and base management capabilities, and assorted stability and UX
improvements.

New Features:
- Add an achievement DLC system with new achievements across multiple
scenarios.
- Enhance Copilot task file selection to support nested paths and
relative directories, and improve the task dropdown grouping.
- Introduce toggles for conducting clue exchange and sending clues in
base automation settings.
- Add winter base group configuration adjustments and new notification
options including Gotify and default Bark categories.
- Redesign the home log sidebar with switchable visual styles, log
thumbnails, and a floating log window button.
- Display depot inventory counts in today’s open stages hints and move
inventory update tips into tooltips.
- Add safeguards such as limiting CPU inference threads, optional auto
resource reload in debug, and blocking startup when running from
temporary directories.

Bug Fixes:
- Fix multiple Copilot and stage automation issues, including failures
after the latest game update and problems clearing or starting tasks via
the input box.
- Resolve clue recognition and placement issues, including one-click
placement when clues are already on the board and incorrect handling
when certain options are combined.
- Fix roguelike and event recognition logic, including hidden ending
recognition, extra-character handling, missing operator availability,
and locale-dependent drop count parsing.
- Address infrastructure-related bugs such as base efficiency
calculation exceptions, remote control screenshots not updating, and
incorrect debug image and document search behavior.
- Correct various assets, strings, and style issues, including stage
name typos, warning cleanups, and updated images for specific locales.
- Ensure Copilot tasks validate and set supported stage names before
starting, and adjust temp directory detection logic to reliably block
running from temporary paths.

Enhancements:
- Refine Copilot tab logic by splitting paradox simulation tasks and
improving related warnings and UX.
- Improve clue exchange and friend clue retrieval logic and general UI
layout, wrapping, tooltips, and thumbnail behavior.
- Refactor dependency helper utilities and related view models, adjust
thumbnail tooltip delays, and rename files to better match the project
structure.
- Tweak announcement dialogs, log thumbnail limits, and other small UI
behaviors for better usability.
- Migrate the development container environment from conda to a
mise/uv-based setup and rename DPS to OPS where appropriate.

Documentation:
- Update and expand user-facing documentation, including one-click CLI
installation, battle protocol camera movement, Chinese integration
formatting, KR docs, and VS Code extension docs for quick OCR.

Chores:
- Adjust folder detection and comments, tune announcement button
positions, and update map configurations and OCR tweaks for various
servers and scenarios.
- Add debug-related helpers such as an IsDebugVersion flag for forced
resource reloads and annotations for GPU use under debugging.

</details>

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

发布 6.2.0 版本,对日志侧边栏进行了全新设计,扩展了 Copilot 和基建管理能力,并带来多项稳定性和用户体验改进。

New Features:
- 新增成就 DLC 系统,在多个关卡场景中加入全新成就。
- 增强 Copilot 任务文件选择功能,支持嵌套路径和相对目录,并改进任务下拉列表的分组方式。
- 在基建自动化设置中新增线索交换与线索发送的开关选项。
- 新增冬季基建分组配置调整,以及包括 Gotify 和默认 Bark 分类在内的通知选项。
- 重新设计首页日志侧边栏,支持切换视觉样式、日志缩略图,并加入悬浮日志窗口按钮。
- 在“今日可打关卡”提示中显示仓库库存数量,并将库存更新提示移动到工具提示(tooltip)中。
- 增加安全防护措施,例如限制 CPU 推理线程数、在调试模式下可选自动资源重载,以及在程序从临时目录运行时阻止启动。

Bug Fixes:
- 修复多个 Copilot 和关卡自动战斗问题,包括最新版游戏更新后导致的失败,以及通过输入框清除或开始任务时出现的问题。
- 解决线索识别与摆放问题,包括当线索已在棋盘上时的一键摆放,以及在某些选项组合下处理不正确的问题。
- 修复肉鸽和活动识别逻辑,包括隐藏结局识别、多余角色处理、干员可用性缺失以及受语言环境影响的掉落数量解析问题。
- 处理基础设施相关的 bug,例如基建效率计算异常、远程控制截图不刷新的问题,以及调试图像和文档搜索行为不正确的问题。
- 修正多处素材、文本与样式问题,包括关卡名拼写错误、警告清理,以及为特定语言环境更新图像资源。
- 确保 Copilot 任务在开始前会校验并设置受支持的关卡名称,并调整临时目录检测逻辑,以可靠地阻止在临时路径中运行。

Enhancements:
- 优化 Copilot 标签页逻辑,将悖论模拟任务拆分并改进相关警告与交互体验。
- 改进线索交换和好友线索获取逻辑,以及通用 UI 布局、换行、工具提示和缩略图行为。
- 重构依赖辅助工具及相关视图模型,调整缩略图工具提示延迟,并重命名文件以更好匹配项目结构。
- 微调公告对话框、日志缩略图数量上限及其他小型 UI 行为,以提升可用性。
- 将开发容器环境从 conda 迁移到基于 mise/uv 的方案,并在合适位置将 DPS 重命名为 OPS。

Documentation:
- 更新和扩充面向用户的文档,包括一键 CLI 安装、战斗协议中的镜头移动说明、中文集成格式、韩文(KR)文档,以及 VS Code 插件快速
OCR 使用说明。

Chores:
- 调整文件夹检测和注释,微调公告按钮位置,并为不同服务器和场景更新地图配置和 OCR 相关参数。
- 新增调试相关辅助内容,例如用于强制资源重载的 `IsDebugVersion` 标志,以及调试模式下 GPU 使用的注解。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Release version 6.2.0 with a redesigned log sidebar, expanded Copilot
and base management capabilities, and assorted stability and UX
improvements.

New Features:
- Add an achievement DLC system with new achievements across multiple
scenarios.
- Enhance Copilot task file selection to support nested paths and
relative directories, and improve the task dropdown grouping.
- Introduce toggles for conducting clue exchange and sending clues in
base automation settings.
- Add winter base group configuration adjustments and new notification
options including Gotify and default Bark categories.
- Redesign the home log sidebar with switchable visual styles, log
thumbnails, and a floating log window button.
- Display depot inventory counts in today’s open stages hints and move
inventory update tips into tooltips.
- Add safeguards such as limiting CPU inference threads, optional auto
resource reload in debug, and blocking startup when running from
temporary directories.

Bug Fixes:
- Fix multiple Copilot and stage automation issues, including failures
after the latest game update and problems clearing or starting tasks via
the input box.
- Resolve clue recognition and placement issues, including one-click
placement when clues are already on the board and incorrect handling
when certain options are combined.
- Fix roguelike and event recognition logic, including hidden ending
recognition, extra-character handling, missing operator availability,
and locale-dependent drop count parsing.
- Address infrastructure-related bugs such as base efficiency
calculation exceptions, remote control screenshots not updating, and
incorrect debug image and document search behavior.
- Correct various assets, strings, and style issues, including stage
name typos, warning cleanups, and updated images for specific locales.
- Ensure Copilot tasks validate and set supported stage names before
starting, and adjust temp directory detection logic to reliably block
running from temporary paths.

Enhancements:
- Refine Copilot tab logic by splitting paradox simulation tasks and
improving related warnings and UX.
- Improve clue exchange and friend clue retrieval logic and general UI
layout, wrapping, tooltips, and thumbnail behavior.
- Refactor dependency helper utilities and related view models, adjust
thumbnail tooltip delays, and rename files to better match the project
structure.
- Tweak announcement dialogs, log thumbnail limits, and other small UI
behaviors for better usability.
- Migrate the development container environment from conda to a
mise/uv-based setup and rename DPS to OPS where appropriate.

Documentation:
- Update and expand user-facing documentation, including one-click CLI
installation, battle protocol camera movement, Chinese integration
formatting, KR docs, and VS Code extension docs for quick OCR.

Chores:
- Adjust folder detection and comments, tune announcement button
positions, and update map configurations and OCR tweaks for various
servers and scenarios.
- Add debug-related helpers such as an IsDebugVersion flag for forced
resource reloads and annotations for GPU use under debugging.

</details>

</details>

</details>
2026-01-09 23:54:01 +08:00
uye
776ee22d79 docs: Revise CHANGELOG for v6.2.0-beta.4
Updated version to v6.2.0-beta.4 and revised changelog entries, including highlights and detailed changes for new features, improvements, fixes, and documentation updates.
2026-01-09 23:53:11 +08:00
uye
f6427b1f3f chore: 删除未使用函数 2026-01-09 23:39:16 +08:00
status102
9fa2971da6 fix: 删多了 2026-01-09 23:31:24 +08:00
AnnAngela
44d74846f4 docs: Update CHANGELOG for version 6.2.0
Updated the CHANGELOG for version 6.2.0, detailing UI enhancements, log sidebar redesign, daily stage hint improvements, base management optimizations, and new achievements.
2026-01-09 23:26:38 +08:00
status102
f60af3f51e fix: 漏了 2026-01-09 23:22:29 +08:00
status102
ff6660aa75 fix: 忘删了 2026-01-09 23:12:13 +08:00
uye
886f2a43dd fix: 肉鸽暂停按钮更新 2026-01-09 23:06:44 +08:00
github-actions[bot]
4ebacda6be docs: Auto Update Changelogs of v6.2.0 (#15340)
* docs: Auto Generate Changelog of Release v6.2.0

* docs:  changelog

* docs: 多了个换行

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-09 22:14:38 +08:00
uye
8deeea77d3 chore: 调整文件夹判断逻辑 2026-01-09 21:42:45 +08:00
uye
b9a850a8c1 Release v6.2.0-beta.3 (#15337)
## Summary by Sourcery

引入专用的悖论协战任务,并优化协战、OCR、肉鸽和基建相关行为,同时移除旧版视频识别路径,并相应更新协议、资源和 UI。

New Features:
- 新增专用的 `ParadoxCopilot` 核心任务和 WPF 模型,用于运行单次或多次的悖论模拟操作。
- 在 UI 中暴露一个肉鸽主题提示字符串,会随所选主题动态更新。
- 在关卡提示 UI 中,将背包物品数量与支线关卡掉落提示一并展示。

Bug Fixes:
- 禁止在非空闲状态下启动协战任务,并在标签页、任务类型与协战列表之间实施更严格的校验,避免任务类型不匹配或空任务运行。
- 修复悖论任务校验逻辑:通过本地化名称检查干员,并在数据过期时触发资源重载和成就更新。
- 确保仓库识别完成后会更新日期输入提示,并在处理报告响应时避免覆盖已有的企鹅 ID。
- 处理物品列表查询中缺失的物品名称,改为返回 null,而不是回显物品 ID。

Enhancements:
- 优化协战文件名处理、文件名显示更新、用户附加信息解析和多任务列表管理,同时移除基于视频的协战流程支持。
- 拓展悖论识别功能以支持读取协战文件,与战斗任务集成,并通过新增的界面任务支持批量悖论操作。
- 通过根据硬件并发度限制线程数并设置顺序执行模式来优化 OCR 和 ONNX 的 CPU 执行表现,并记录相关配置日志。
- 改进基建线索处理:使用 OCR 决定是否通过「快速填入」按钮进行批量插入,简化返回接待室的导航流程,并在设施检测失败时保存调试图片。
- 在协战物品集合发生变化时增加日志和索引维护,并确保自动编队和协战列表的使用遵循当前选中的标签页。
- 将自动资源重载功能置于新的用户开关之后,并在合适的构建版本中提供对应的 UI 选项。
- 收紧协战多任务序列化的错误信息,并在助手中清晰区分 SSS 和悖论列表的处理。
- 阻止从临时目录运行应用程序,并向用户显示错误提示,同时新增用于检测临时目录运行环境的工具方法。
- 在核心、代理和文档中统一「集成战略」回调事件名称和日志键(`Combat/Emergency`)。
- 通过使用现代集合初始化器和属性依赖工具,以及集中处理部分 UI 更新,简化多个 WPF 视图模型与服务实现。

Build:
- 从代码库中移除 AutoLocalization 工具目录及相关 Python 项目文件。

Documentation:
- 更新所有支持语言的集成协议文档,移除已废弃的协战列表字段 `is_paradox` 支持,并补充新的 `ParadoxCopilot`
任务结构说明。
- 修订回调结构文档,在所有语言中反映重命名后的集成战略战斗相关子任务标识符。

Chores:
- 更新明日方舟资源数据文件(关卡、地块、战斗数据、基建、物品索引、肉鸽任务、UI 主题任务以及版本元数据),并为近期关卡新增地块位置文件。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Introduce a dedicated paradox copilot task and refine copilot, OCR,
roguelike, and infrastructure behaviors while removing legacy video
recognition paths and updating protocols, resources, and UI accordingly.

New Features:
- Add a dedicated ParadoxCopilot core task and WPF model to run single
or multiple paradox simulation operations.
- Expose a roguelike theme tip string in the UI that updates with the
selected theme.
- Surface inventory counts alongside side-story stage drop tips in the
stage tips UI.

Bug Fixes:
- Prevent starting copilot tasks from non-idle state and enforce better
validation between tabs, task types, and copilot lists to avoid
mismatched or empty runs.
- Fix paradox task validation by checking operators against localized
names, triggering resource reloads and achievements on outdated data.
- Ensure depot recognition completion updates the date prompt and avoid
overwriting an existing Penguin ID when processing report responses.
- Handle missing item names in item list lookups by returning null
instead of echoing the ID.

Enhancements:
- Refine copilot filename handling, display filename updates, user
additional parsing, and multi-task list management, while dropping
support for video-based copilot flows.
- Extend paradox recognition to consume copilot files, integrate with
the battle task, and support batch paradox operations via a new
interface task.
- Optimize OCR and ONNX CPU execution by limiting thread counts based on
hardware concurrency and setting sequential execution modes, and log
relevant configuration.
- Improve infrastructure clue handling by using OCR to decide bulk
insertion via the quick-insert button, simplifying navigation back to
reception, and saving debug images when facility detection fails.
- Add logging and index maintenance when the copilot item collection
changes and ensure auto-formation and copilot list usage respect the
selected tab.
- Gate auto resource reload behind a new user-toggle flag, and expose a
UI option for it in appropriate builds.
- Tighten copilot multi-task serialization error messages and cleanly
separate SSS and paradox list handling in the assistant.
- Block running the app from temporary directories with a user-facing
error message, and add a utility to detect temp-directory execution
environments.
- Align Integrated Strategy callback event names and logging keys
(Combat/Emergency) across core, proxy, and documentation.
- Simplify various WPF view models and services by using modern
collection initializers and property dependency utilities, and by
centralizing certain UI updates.

Build:
- Remove the AutoLocalization tooling directory and associated Python
project files from the repository.

Documentation:
- Update integration protocol docs in all supported languages to remove
deprecated copilot list `is_paradox` support and document the new
ParadoxCopilot task schema.
- Revise callback schema docs to reflect renamed Integrated Strategy
combat-related subtask identifiers across all languages.

Chores:
- Update Arknights resource data files (stages, tiles, battle data,
infrastructure, item index, roguelike tasks, UI theme tasks, and version
metadata) and add new tile position files for recent stages.

</details>
2026-01-09 21:41:29 +08:00
github-actions[bot]
58de47bca7 docs: Auto Update Changelogs of v6.2.0-beta.3 (#15338)
* docs: Auto Generate Changelog of Release v6.2.0-beta.3

* docs: changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-09 21:40:01 +08:00
github-actions[bot]
dd703da02f feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20853303793
[skip changelog]
2026-01-09 13:24:02 +00:00
uye
efadf87944 rft: 重构自动战斗标签页逻辑, 拆分悖论模拟任务 (#15327)
* fix: 自动战斗切换至其他活动时不会取消战斗列表

* fix: 运行时禁止切换标签页

* fix: 调整悖论模拟检查顺序

* chore: 移除视频识别

* rft: 重构自动战斗选项页,增加列表混用与类型检查

* feat: 切换标签页时清空作业输入框

* chore: 添加注释

* refactor: 移除 CopilotItemViewModel 中的 Index 属性并更新相关逻辑 (#15328)

* rft: 重构拆分悖论模拟任务

* fix: stage_name

* Revert "refactor: 移除 CopilotItemViewModel 中的 Index 属性并更新相关逻辑 (#15328)"

This reverts commit bbdca4ebcb.

* fix: Wpf 自动战斗-战斗列表 拖动后index错误

* i18n: zh-tw

* i18n: KR

* i18n: EN

* i18n: JP

* style: 空格

---------

Co-authored-by: yali-hzy <48376189+yali-hzy@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2026-01-09 21:16:16 +08:00
uye
fae39b8fa4 refactor(BREAKING): rename Dps to Ops (#15325)
* refactor!: rename Dps to Ops (breaking change for callbacks)

BREAKING CHANGE: This changes all callback interfaces from Dps to Ops naming.

* chore: 删除 AutoLocalization

* fix: typo
2026-01-09 20:54:49 +08:00
uye
6e0e3998b9 fix: 撷英调香师 2026-01-09 20:42:15 +08:00
uye
5a30197362 debug: 测试代码
[skip changelog]
2026-01-09 20:41:56 +08:00
uye
60e191adf7 feat: 自动战斗日志栏添加日志悬浮窗按钮 2026-01-09 20:36:02 +08:00
github-actions[bot]
a02e9b8fc0 chore: Auto Update Game Resources - 2026-01-09
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20850458500

[skip changelog]
2026-01-09 11:34:40 +00:00
uye
224ede8c31 feat: 低于 2 核心电脑使用单线程 OCR 2026-01-09 19:28:01 +08:00
uye
82ee510499 feat: 更新库存提示移到 ToolTip 2026-01-09 19:25:23 +08:00
uye
6f99eb5a7b feat: 关卡提示支持显示库存 2026-01-09 18:43:03 +08:00
uye
04b7b11dfc perf: 优化线索交流、获取好友线索逻辑 2026-01-09 17:45:33 +08:00
status102
352ae52ca1 chore: H16-4, 引航者#6 TN-1~TN-4 剩余地图 view[1] 2026-01-09 17:34:02 +08:00
雪银星月
1b98edc30a feat(roguelike): 新增肉鸽主题推荐配置tip并适配多语言 (#15324)
* feat(roguelike): 新增肉鸽主题推荐配置提示并适配多语言

* fix(roguelike): 用显式映射获取主题提示并添加本地化回退

* fix(roguelike): 优化注释以统一风格

* i18n: KR

* i18n: KR use direct text

* i18n: JP

* i18n: EN + ★ changes

* i18n: zh-tw

* feat: 调整界面布局

---------

Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Manicsteiner <Manicsteiner@outlook.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: HY <45387477+momomochi987@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-09 17:20:15 +08:00
MistEO
bb9fc88042 feat: Disable CoreML for detection and recognition on macOS
Comment out CoreML usage for detection and recognition options due to precision issues reported by users.
2026-01-09 14:04:12 +08:00
status102
ccf6df9046 fix: 20260109 游戏更新导致自动战斗失效 2026-01-09 13:37:19 +08:00
SherkeyXD
2c82a696d8 chore: 移除多余关卡 2026-01-09 12:55:24 +08:00
SherkeyXD
4ec4d33d49 feat: SideStory「雅赛努斯复仇记」导航 2026-01-09 12:06:38 +08:00
SherkeyXD
df79e53b31 chore: port changes from api 2026-01-09 10:31:39 +08:00
github-actions[bot]
1bcb29ded2 chore: Auto Update Game Resources - 2026-01-08
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20835385463

[skip changelog]
2026-01-08 23:28:22 +00:00
github-actions[bot]
96d2ccac88 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20833010392
[skip changelog]
2026-01-08 21:53:11 +00:00
github-actions[bot]
6784e6fcab chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20831693747
[skip changelog]
2026-01-08 21:04:56 +00:00
uye
577399c1f6 chore: 添加挂调试器下使用 GPU 的注释 2026-01-09 03:59:10 +08:00
uye
a46387b28b feat: 限制使用 CPU 推理时的线程占用数,优先保证模拟器运行
Test (operator recognition OCR, high-frequency)
Platform: i7-13700KF + RTX 4080S

CPU:
1t  11%  3m30s
2t  24%  2m11s
3t  28%  1m42s
4t  36%  1m29s
5t  50%  1m25s

GPU (DirectML):
5% CPU / 2% GPU / 36s
2026-01-09 03:09:47 +08:00
uye
cea14f843b feat: 基建进入设施失败时保留测试截图 2026-01-09 01:42:24 +08:00
uye
6657421336 feat: 将自动重载资源独立出来,在 debug 模式下显示勾选框 2026-01-09 01:03:19 +08:00
github-actions[bot]
1091dfceb1 chore: Auto Templates Optimization
Triggered by b385b472e4

[skip changelog]
2026-01-08 16:25:48 +00:00
uye
b385b472e4 feat: 尝试增加 b服 开屏活动跳过 2026-01-09 00:25:23 +08:00
uye
91971ce650 fix: 线索数量识别 2026-01-08 19:27:33 +08:00
github-actions[bot]
d6723d93de feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20797719573
[skip changelog]
2026-01-07 21:53:24 +00:00
Rbqwow
58d71d79c1 feat: 检测到自身处于临时路径中时阻止启动 (#14961)
* feat: 检测到自身处于临时路径中时阻止启动

* feat: 增加环境变量中的 temp 判断

---------

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-08 01:40:38 +08:00
github-actions[bot]
31eb59e5ff chore: Auto Templates Optimization
Triggered by 2288392dde

[skip changelog]
2026-01-07 17:20:06 +00:00
uye
2288392dde fix: 线索板上有线索时无法一键放置线索 2026-01-08 01:19:34 +08:00
uye
be4a96a06f feat: 企鹅物流上报 ID 不为空时禁止被上报结果赋值 2026-01-07 23:21:54 +08:00
uye
34fa52495f fix: 同时开启 剿灭模式备选关卡 会导致 企鹅物流汇报 ID 被修改
fix #15323
2026-01-07 23:14:58 +08:00
晓丶梦丶仁
b877be6b30 fix: Filename too long 2026-01-07 18:11:33 +08:00
github-actions[bot]
95d2d1dcf3 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20762004855
[skip changelog]
2026-01-06 21:04:29 +00:00
uye
48ca14e835 Release v6.2.0-beta.2 (#15315)
## Summary by Sourcery

优化日志卡片和缩略图处理,引入可复用的属性依赖初始化方式,并新增可配置的卡片日志选项,同时更新 copilot 路径解析、游戏内任务行为以及
VSCode 扩展文档。

New Features:
- 新增一个 GUI 设置和配置键,用于启用或禁用卡片样式日志。
- 更新 copilot 配置文件名处理逻辑,在通过已知映射找不到文件时支持使用原始路径。
- 在确认基础设施操作时输出额外信息,并使用更新后的卡片图片将其同步到 GUI 日志中。

Bug Fixes:
- 防止将缩略图附加到已经被移除的日志卡片上。
- 在获取日志缩略图信号量时允许短暂等待,以在高并发情况下减少丢失的截图。
- 确保在肉鸽设置中只有在指定核心角色时才会使用支援单位。
- 修复 Secret Front 关卡名称解析和路线匹配,以正确处理新增关卡。
- 调整数字正则表达式以改进对掉落时间文本的识别。

Enhancements:
- 将 PropertyDependsOn 支持重构为共享工具,并更新各视图模型以使用带有新辅助方法的通用
PropertyChangedBase。
- 调整日志卡片创建与拆分逻辑,使空日志也能按预期触发图片更新和卡片边界。
- 当战斗轮次上限可能无法完全消耗配置的次数时,向用户发出警告。
- 调整多语言的 VSCode 扩展文档,以说明快速识别功能并澄清 OCR 模型的处理方式。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine log card and thumbnail handling, introduce reusable
property-dependency initialization, and add a configurable card-log
option while updating copilot path resolution, in-game task behavior,
and VSCode extension docs.

New Features:
- Add a GUI setting and configuration key to enable or disable
card-style logging.
- Update copilot configuration filename handling to support raw paths
when files are not found via known mappings.
- Emit extra info when confirming infrastructure actions and sync it to
the GUI log with updated card images.

Bug Fixes:
- Prevent attaching thumbnails to log cards that have already been
removed.
- Allow a short wait when acquiring the log thumbnail semaphore to
reduce dropped captures under contention.
- Ensure support units are only used when a core character is specified
in roguelike settings.
- Fix Secret Front stage name parsing and route matching to correctly
handle additional stages.
- Improve recognition of drop times text by adjusting the numeric regex.

Enhancements:
- Refactor PropertyDependsOn support into a shared utility and update
view models to use the common PropertyChangedBase with the new helper.
- Adjust log card creation and splitting logic so empty logs can still
trigger image updates and card boundaries as intended.
- Warn users when battle run limits may not fully consume the configured
number of runs.
- Tweak VSCode extension documentation in multiple languages to describe
quick recognition and clarify OCR model handling.

</details>

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

优化日志卡片和缩略图处理,引入可复用的属性依赖初始化方式,并新增可配置的卡片日志选项,同时更新 copilot 路径解析、游戏内任务行为以及
VSCode 扩展文档。

New Features:
- 新增一个 GUI 设置和配置键,用于启用或禁用卡片样式日志。
- 更新 copilot 配置文件名处理逻辑,在通过已知映射找不到文件时支持使用原始路径。
- 在确认基础设施操作时输出额外信息,并使用更新后的卡片图片将其同步到 GUI 日志中。

Bug Fixes:
- 防止将缩略图附加到已经被移除的日志卡片上。
- 在获取日志缩略图信号量时允许短暂等待,以在高并发情况下减少丢失的截图。
- 确保在肉鸽设置中只有在指定核心角色时才会使用支援单位。
- 修复 Secret Front 关卡名称解析和路线匹配,以正确处理新增关卡。
- 调整数字正则表达式以改进对掉落时间文本的识别。

Enhancements:
- 将 PropertyDependsOn 支持重构为共享工具,并更新各视图模型以使用带有新辅助方法的通用
PropertyChangedBase。
- 调整日志卡片创建与拆分逻辑,使空日志也能按预期触发图片更新和卡片边界。
- 当战斗轮次上限可能无法完全消耗配置的次数时,向用户发出警告。
- 调整多语言的 VSCode 扩展文档,以说明快速识别功能并澄清 OCR 模型的处理方式。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine log card and thumbnail handling, introduce reusable
property-dependency initialization, and add a configurable card-log
option while updating copilot path resolution, in-game task behavior,
and VSCode extension docs.

New Features:
- Add a GUI setting and configuration key to enable or disable
card-style logging.
- Update copilot configuration filename handling to support raw paths
when files are not found via known mappings.
- Emit extra info when confirming infrastructure actions and sync it to
the GUI log with updated card images.

Bug Fixes:
- Prevent attaching thumbnails to log cards that have already been
removed.
- Allow a short wait when acquiring the log thumbnail semaphore to
reduce dropped captures under contention.
- Ensure support units are only used when a core character is specified
in roguelike settings.
- Fix Secret Front stage name parsing and route matching to correctly
handle additional stages.
- Improve recognition of drop times text by adjusting the numeric regex.

Enhancements:
- Refactor PropertyDependsOn support into a shared utility and update
view models to use the common PropertyChangedBase with the new helper.
- Adjust log card creation and splitting logic so empty logs can still
trigger image updates and card boundaries as intended.
- Warn users when battle run limits may not fully consume the configured
number of runs.
- Tweak VSCode extension documentation in multiple languages to describe
quick recognition and clarify OCR model handling.

</details>

</details>
2026-01-07 03:56:33 +08:00
github-actions[bot]
cce5463e5c docs: Auto Update Changelogs of v6.2.0-beta.2 (#15316)
* docs: Auto Generate Changelog of Release v6.2.0-beta.2

* docs: changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-07 03:54:00 +08:00
uye
f98ccb6eaf fix: ai review 2026-01-07 03:42:15 +08:00
github-actions[bot]
c963384124 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20759668897
[skip changelog]
2026-01-06 19:30:40 +00:00
uye
d3aaf5645e feat: 支持日志样式切换 2026-01-07 03:21:20 +08:00
uye
f6b4072780 perf: 优化缩略图逻辑 2026-01-07 02:41:26 +08:00
Constrat
f404eaa3c8 i18n: EN for FightTimesMayNotExhausted 2026-01-06 19:01:27 +01:00
uye
eab9143533 chore: 调整 MaxNumberOfLogThumbnails 作用域,调整默认数量 2026-01-07 01:48:02 +08:00
uye
9456f73ea7 feat: 基建设施缩略图 2026-01-07 01:37:06 +08:00
uye
59db82e638 feat: addlog 允许只更新图片不添加内容 2026-01-07 00:28:26 +08:00
Constrat
29f63322ba fix: fix SA1518 warnings 2026-01-06 14:32:24 +01:00
芆芮
eac2d39834 chore: YoStarJP SN device ocr (#15310) 2026-01-06 21:07:53 +08:00
uye
4abf4d63d0 fix: 肉鸽未填写开局干员时借助战强制为 false
fix #15311
2026-01-06 20:37:48 +08:00
uye
ab32660f41 fix: 隐秘战线结局识别 2026-01-06 19:49:45 +08:00
uye
c2b0c1f177 fix: 隐秘战线识别到多余字符时无法进入对应事件
fix #15303
2026-01-06 19:24:46 +08:00
uye
20c437b32b perf: 重命名以符合文件结构 2026-01-06 19:15:41 +08:00
uye
cfb973e037 perf: 优化 PropertyDependsOnHelper 实现 2026-01-06 19:11:33 +08:00
github-actions[bot]
7e962c4394 chore: Auto Update Game Resources - 2026-01-06
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20746324315

[skip changelog]
2026-01-06 11:03:47 +00:00
uye
39d156cc26 rft: 将 PropertyDependsOnViewModel 改为静态工具类 2026-01-06 18:17:59 +08:00
uye
7abd89480b perf: 调整缩略图 ToolTip 延迟 2026-01-06 17:52:33 +08:00
commondservice
a158b12ddf fix: waydroid rawbync screencap 2>/dev/null (#15196) 2026-01-06 17:45:56 +08:00
Chen Chen
24aec64266 fix: 避免其他locale下,掉落次数误认数字字符 (#15306) 2026-01-06 17:43:19 +08:00
nekosu
459c55df40 docs: update vsc ext docs for quick ocr (#15298)
Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2026-01-06 17:37:42 +08:00
uye
c151f97af1 fix: 无法通过删除自动战斗输入框内容清除当前作业,无法通过在输入框输入神秘代码直接开始战斗 2026-01-06 16:54:01 +08:00
Status102
a67e2b4fb9 perf: 刷理智任务指定次数与代理倍率冲突提醒 (#15233)
* perf: 移动刷理智过程中的未消耗次数输出到任务结束

fix: 刷理智任务参数设置提醒

* i18n: KR

* i18n: zh-tw

* i18n: JP

---------

Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: HY <45387477+momomochi987@users.noreply.github.com>
Co-authored-by: Manicsteiner <Manicsteiner@outlook.com>
2026-01-06 16:24:56 +08:00
github-actions[bot]
e3734a715f chore: Auto Update Game Resources - 2026-01-05
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20726135855

[skip changelog]
2026-01-05 19:04:53 +00:00
uye
27ec293dca Release v6.2.0-beta.1 (#15299) 2026-01-05 22:12:34 +08:00
github-actions[bot]
3e9f19cc22 docs: Auto Update Changelogs of v6.2.0-beta.1 (#15301)
* docs: Auto Generate Changelog of Release v6.2.0-beta.1

* docs: changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-05 22:12:16 +08:00
uye
50e9767f0c perf: 优化界面显示效果 2026-01-05 21:29:38 +08:00
drway
22c0593343 feat: 增加冬时至基建温蒂组并调整温蒂组选人逻辑 (#15294)
* fix: 修正了温蒂组: 2电站效率

将温蒂组: 2电站时效率由 30% 修正到了正确的 20%。

* feat: 增加冬时至基建温蒂组并调整温蒂组选人逻辑

将冬时-1加入温蒂组的换班逻辑中。
考虑到现在 冬时-1 + 森蚺/异客2 + 清流-1 也可以构成温蒂组,新增逻辑“冬时组”,加入了上述换班逻辑。
将温蒂/森蚺-2的权重上调至30.2(考虑到温蒂/森蚺2可受晨曦格雷伊加成),在选人时会优先选择温蒂/森蚺-2而不是冬时。
2026-01-05 20:31:43 +08:00
uye
3d42e5e55f feat: 成就 dlc (#15288)
* feat: 成就描述与翻译

* feat: 开着日志悬浮窗完成一次任务

* feat: 在公开招募中刷新标签 50 次

* feat: 累计开启线索交流 20/50 次

* feat: 累计向好友发送 20/50 次线索

* feat: 单次运行中,勾选超过 7 个任务

* feat: 在更新发布后 1 天/1 小时 内完成更新

* feat: 完成{key=Combat}时刚好消耗完所有理智

* feat: 设置并使用一个超过 4 个修饰键的热键组合

* feat: 仓库识别功能识别到仓库内某种材料数量超过 5000 个(不包括作战记录!)

* perf: 优化界面布局

* chore: 调整触发条件

* fix: 部分成就弹窗无法显示

* feat: 单轮公招任务连续招募 10/20 次

* feat: 支持组内排序

* perf: 优化成就排序

* feat: 干员识别中包含干员“帕拉斯”

* feat: 使用远程协议调用错误的任务 id

* feat: 尝试切换界面语言

* feat: 设置开机启动 MAA

* feat: 连续 7 天每天集齐并开启线索交流

* feat: 325

* chore: 调整 325 触发条件
2026-01-05 20:30:26 +08:00
HY
c6037cc4d7 feat: 增強自动战斗文件选择功能,支持多级路径和相对目录 (#15174)
* chore: 先依照保全派駐週期粗略分類

* chore: 換個位置

* chore: 換成用地圖名稱分類

* chore: 再改 再改

* chore: 別空白了 伺服器會被殺死的

* chore: 補上下拉選單顯示的 json 檔案名稱,避免解析錯誤

* chore: 幫展開後的下拉選單加上寬度限制

* Revert "chore: 幫展開後的下拉選單加上寬度限制"

This reverts commit d5f80c9d6e.

* feat: 新增文件树视图项样式

* perf: 优化自动战斗下拉列表

* feat: 统一样式

* chore: 删除多余调用

---------

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-05 20:29:13 +08:00
9cde16b262 feat: 通知渠道添加 Gotify (#15284)
* feat: 通知渠道添加 Gotify

* fix: 移除 Gotify 通知内容中的颜色标记

* fix: 优化 Gotify 通知格式处理
2026-01-05 17:56:37 +08:00
Weiyou Wang
5bd9a40560 fix: 给缺失干员检查补上 Unavailable (#15296)
fix: 缺失干员检查补上 Unavailable
2026-01-05 11:14:51 +08:00
github-actions[bot]
c679542c5f feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20699650804
[skip changelog]
2026-01-04 21:52:42 +00:00
Constrat
2b222eae65 chore: add IsDebugVersion to _forcedReloadResource (#15293)
fix: add IsDebugVersion to _forcedReloadResource
2026-01-04 20:58:49 +01:00
uye
9feba528e2 fix: 尝试修复基建效率计算中的 out_of_range 异常
fix #15287
2026-01-04 20:35:01 +08:00
HX3N
dde55b8310 chore: YostarKR tweak AS-OpenOcr
to prevent misrecognition
2026-01-04 19:03:24 +09:00
uye
06f2740ce4 chore: 调整注释 2026-01-04 15:46:37 +08:00
Loong
e1cf1ff24a docs: 使用脚本一键安装 maa-cli (#15283) 2026-01-04 15:09:03 +08:00
HX3N
154adf2266 docs: update KR documents (#15282) 2026-01-04 10:36:17 +09:00
Rbqwow
e29c1243c6 docs: 源码链接同步最新行数
想了想还是觉得指向HEAD而非某个commit更好一点,但是要跟着行数变化
2026-01-04 06:29:00 +08:00
github-actions[bot]
7525028f36 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20683420431
[skip changelog]
2026-01-03 21:52:48 +00:00
uye
a5c25fddda feat: 可以点 20 次按钮关闭弹窗 2026-01-03 22:53:25 +08:00
uye
5467030be4 perf: 优化换行 2026-01-03 22:31:04 +08:00
Constrat
5fae60911d fix: update DormMini.png for EN (again) 2026-01-03 15:25:59 +01:00
Constrat
534ad0a7a0 fix: SA1633 warning missing copyright notice 2026-01-03 15:25:11 +01:00
SherkeyXD
8ed11ba8ec chore: 微调公告确认按钮位置 2026-01-03 20:29:22 +08:00
Manicsteiner
b404672b0b chore: YostarJP roguelike JieGarden ocr edit 2026-01-03 12:56:42 +08:00
github-actions[bot]
6ee4544d92 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20666643117
[skip changelog]
2026-01-02 21:04:50 +00:00
uye
cc58382158 style: typo 2026-01-03 02:51:02 +08:00
uye
637ebc87ad feat: 还点? 2026-01-03 02:49:48 +08:00
uye
2f3dbf55d2 docs: 中文集成文档统一格式 2026-01-03 01:40:33 +08:00
uye
215d76e38d feat: 允许设置是否启用线索交流与赠送线索 (#15278)
* feat: 允许设置是否启用线索交流与赠送线索

* feat: ui 支持设置赠送线索,将借助战打 OF-1 的一日一次功能拆出来

* perf: 调整界面布局

* i18n: 漏了一个翻译

* chore: 简化代码

* docs: 补充文档
2026-01-03 00:04:10 +08:00
AnselYuki
0fd4b8185e feat: 给 bark 通知添加默认的分类组 (#15244) 2026-01-02 23:58:20 +08:00
MistEO
c4d361a363 feat: 重构主页日志侧边栏整体布局和样式 (#15211)
* feat: 重构主页日志侧边栏整体布局和样式

* feat: 优化一下Live

* refactor: 调整卡片布局

* revert: 回滚不知道干嘛的改动

* feat: 调整右上角悬浮窗布局

* chore: AI一直在改个啥

* Revert "chore: AI一直在改个啥"

This reverts commit b5ae565c34a2a187ae953cc385b0b85de83fc140.

* perf: 调整卡片分割逻辑,优化界面布局

* perf: 优化显示效果

* rft: 简化绑定

* chore: 调整界面布局

* feat: 任务报错更新缩略图

* feat: 肉鸽开始探索前分割卡片

* feat: 肉鸽结算更新缩略图

* feat: 肉鸽战斗成功/失败时更新缩略图

* feat: 事件选择更新图片

* fix: 在缩放时对 BGR 缓冲区长度或尺寸不匹配的情况进行防护

* chore: 添加日志,删除无用的 using

* style: 格式化代码

* fix: 避免在使用 PropertyDependsOn 的同时重复发送依赖属性通知。

* fix: 下载日志错位

* fix: 图片数量限制错误

* feat: 自定义最大缩略图数量

* fix: en 语言下背景图片选择按钮文字无法显示完全

* chore: 新用户标题栏默认不显示配置名称

* chore: 标题栏端口地址默认省略 127.0.0.1: 与 localhost:

* feat: 卡片背景色

* chore: 删除没用的 ColumnDefinitions

* feat: 就要四个字

---------

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-02 23:40:26 +08:00
Loong
286908d41e ci: use git2/vendored-openssl feature flag for cli (#15279) 2026-01-02 23:40:11 +08:00
yali-hzy
bd4039d442 perf: 在禁用时 TooltipBlock 显示特效 (#15260)
* perf: 在禁用时 TooltipBlock 显示特效

* perf: 改用 ToolTip 触发改善性能

---------

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2026-01-02 23:01:59 +08:00
SherkeyXD
e87608411f fix(docs): 修复文档站搜索问题 2026-01-02 21:51:08 +08:00
SherkeyXD
a0e5f9b3a6 rft: devcontainer 从 conda 迁移至 mise/uv (#15251)
Co-authored-by: Lucien Shaw <myxlc55@outlook.com>
2026-01-02 21:45:14 +08:00
白隐Hakuin
1456fbb91c fix: 远程控制截图无法获取最新图像 (#15276) 2026-01-02 19:20:55 +08:00
Hao Guan
6eaf74a289 fix: Debug图片保存目录 (#15250) 2026-01-02 17:26:22 +08:00
uye
edc8768b2e fix: 鬼影迷踪 -> 诡影迷踪
fix #15274
2026-01-02 15:28:24 +08:00
github-actions[bot]
1ce8ff4262 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20645504464
[skip changelog]
2026-01-01 21:04:54 +00:00
晓丶梦丶仁
d0b594cdc0 docs: 战斗协议 移动镜头 (#15261)
* docs: 战斗协议 移动镜头

* docs: details

* docs: 地图站链接
2026-01-02 03:24:29 +08:00
uye
807adf92fa Release v6.1.1 (#15270)
## Summary by Sourcery

CI:
- 调整 CI 和冒烟测试工作流的并发组配置,在键中加入仓库和分支信息,以更好地隔离各次运行。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

CI:
- Adjust CI and smoke test workflow concurrency groups to include
repository and branch in the key to better isolate runs.

</details>
2026-01-02 03:20:37 +08:00
MistEO
7397e1ac00 ci: fix concurrency group (#15269) 2026-01-02 02:28:55 +08:00
MistEO
c7c8466b10 ci: fix linux build (#15268) 2026-01-02 02:16:31 +08:00
Constrat
e0c226f7bb chore: optimize template
[skip changelog]
2026-01-01 18:30:58 +01:00
Constrat
de4b86fda8 fix: update Roguelike@TraderRandomShoppingConfirm for EN
fix #15264
2026-01-01 18:30:45 +01:00
MistEO
21181c2872 ci: try to fix linux arm64 build 2026-01-02 01:24:39 +08:00
MistEO
01b59f54fe ci: limit CI in PRs within the same branch 2026-01-02 01:18:30 +08:00
MistEO
03634ae516 ci: try to fix linux build 2026-01-02 01:03:13 +08:00
github-actions[bot]
2621b0a77b chore: Auto Update Game Resources - 2026-01-01
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20641861359

[skip changelog]
2026-01-01 16:30:53 +00:00
uye
cf42b1a9fd Release v6.1.1 (#15262)
## Summary by Sourcery

使版本报告与 MAA 核心配置保持一致,加固任务解析与符号处理,改进战斗/地图交互与图像工具,并为新版本优化 CI 缓存清理和资源数据。

New Features:
- 在生成和裁剪基于 ROI 的任务时,新增对分组 UI 主题变体和嵌套图像布局的支持。
- 引入新的 TXWY 关卡任务定义,并更新多种肉鸽和 UI 主题任务资源。

Bug Fixes:
- 通过引入来自地块位置信息的地图视图偏移,修复地块位置以及技能/撤退按钮的计算。
- 在撤退后通过取消选中作为保护措施,防止干员被误操作。
- 在执行清理前检查地图目录,避免删除不存在的地图图像。
- 通过处理缺失的 PR 和与陈旧分支相关的缓存,提高缓存清理脚本的健壮性。
- 通过统一使用拥有所有权的 `std::string` 作为键和容器,替代基于 `std::string_view`
的映射,提高任务与符号解析的稳定性。

Enhancements:
- 将版本日志、API 上报和上传数据统一切换为使用统一的 `MAA_VERSION` 配置和一致的 `DEBUG_VERSION` 标记。
- 通过委托给更高层级的流程任务,简化基建设施线索的快速插入处理逻辑。
- 整理版本更新 UI 逻辑与注释,以反映新的调试版本命名约定。
- 调整图像裁剪器的输出,以提供更清晰的 ROI 诊断信息和控制台消息。
- 优化 JSON 工具中关于默认值检查的注释,而不改变运行时行为。

CI:
- 扩展 GitHub 缓存清理脚本,覆盖与 Linux X64 prek 构建相关的更多缓存键模式,并更智能地清理 PR 和分支缓存。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Align version reporting with MAA core config, harden task parsing and
symbol handling, improve battle/map interactions and image tooling, and
refine CI cache cleanup and resource data for the new release.

New Features:
- Add support for grouped UI theme variants and nested image layouts
when generating and cutting ROI-based tasks.
- Introduce a new TXWY stage task definition and update various
Roguelike and UI theme task resources.

Bug Fixes:
- Fix tile position and skill/retreat button calculations by
incorporating map view offsets from tile position data.
- Prevent unintended operator interactions after retreat by cancelling
selection as a safeguard.
- Avoid deleting non-existent map images by checking the map directory
before cleanup.
- Increase robustness of cache cleanup scripts by handling missing PRs
and stale branch-related caches.
- Improve stability of task and symbol parsing by standardizing on
owning std::string keys and containers instead of
std::string_view-backed maps.

Enhancements:
- Switch version logging, API reporting, and upload payloads to use the
unified MAA_VERSION config and consistent DEBUG_VERSION marker.
- Simplify infrastructure clue quick-insert handling by delegating to a
higher-level process task.
- Tidy version update UI logic and comments to reflect the new debug
version naming convention.
- Adjust image cropper output for clearer ROI diagnostics and console
messaging.
- Refine JSON utility comments around default-value checks without
changing runtime behavior.

CI:
- Extend GitHub cache cleanup scripts to cover additional cache key
patterns related to Linux X64 prek builds and to clean both PR and
branch caches more intelligently.

</details>
2026-01-02 00:28:01 +08:00
uye
f28c10a0b1 docs: update changelog 2026-01-02 00:26:37 +08:00
github-actions[bot]
6ae3cb685c feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20641688332
[skip changelog]
2026-01-01 16:16:56 +00:00
uye
16e23a32b7 feat: 隐秘战线支持系列任务 (#15249)
* feat: 隐秘战线支持系列事件

* fix: 漏了个事件

* fix: 避免修改任务导致后续无法进入系列任务

* fix: 怎么小游戏没禁用运行时修改

* rft: 提取通用逻辑

* i18n: KR

* i18n: EN

* i18n: KR fix typo

* i18n: JP

* i18n: txwy

* perf: 优化解析逻辑

* fix: 隐秘战线结局与事件无法保存

* chore: text → ocrReplace

* chore: 再改一點 gui 上的東西

---------

Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: Manicsteiner <Manicsteiner@outlook.com>
Co-authored-by: momomochi987 <as99us301@gmail.com>
2026-01-02 00:15:30 +08:00
uye
5fd5c8a90f feat: 新增模板路径同步工具 (#15254)
* feat: 新增模板路径同步工具

* feat: 移动路径

* chore: remove stale templates + move HS to stagenavigation

* chore: update optimize_templates with new paths

* chore: KR remove unused templates

* chore: remove unused templates for txwy

* feat: 自动删除空文件夹

* chore: update optimize_templates.json

* fix: typo

---------

Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: momomochi987 <as99us301@gmail.com>
2026-01-01 23:37:11 +08:00
github-actions[bot]
9673b62ec7 chore: Auto Update Game Resources - 2026-01-01
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20641085022

[skip changelog]
2026-01-01 15:29:06 +00:00
Status102
fab4a272fd fix: 自动战斗击杀数识别错误 (#15266) 2026-01-01 23:22:54 +08:00
Constrat
2dddb7b231 ci: perhaps found a typo 2026-01-01 16:18:55 +01:00
status102
292624166f fix: 自动战斗 击杀数、费用识别 useRaw = false 2026-01-01 23:17:47 +08:00
status102
d85291a97a refactor: useRaw 参数设置重构 2026-01-01 23:17:17 +08:00
Constrat
cd0273d321 ci: try to fix cache miss on smoke-testing 2026-01-01 16:06:51 +01:00
github-actions[bot]
c7d9fc37f6 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20637168125
[skip changelog]
2026-01-01 10:40:12 +00:00
岩浆浮沉的木梳
5bc1d2835d chore: YostarJP copper regex (#15257)
* chore: YostarJP copper regex

* chore: YostarJP copper regex

act for event recognition failed:
まんまるな財神

* chore: YostarJP copper regex

fix: 通宝認識失敗: 「衡-軍屯翠す」

* chore: YostarJP copper regex

fix: 通宝認識失敗: 「厲-頃異を安める」
2026-01-01 16:33:53 +08:00
status102
2ecb2b7206 fix: 自动战斗击杀数识别错误 2026-01-01 14:21:11 +08:00
HX3N
0943c48f4e i18n: KR tweak NightlyWarning and CheckBeforeReportingIssue 2026-01-01 09:01:06 +09:00
github-actions[bot]
a2c99dc72d chore: Auto Templates Optimization
Triggered by d036a2594c

[skip changelog]
2025-12-31 18:56:22 +00:00
uye
d036a2594c chore: 更新截图 2026-01-01 02:55:57 +08:00
Constrat
0a89c82ba1 ci: fixes to cache removal scripts 2025-12-31 19:13:12 +01:00
Constrat
0224f51076 feat: YostarEN base templates overhaul 2025-12-31 18:05:48 +01:00
github-actions[bot]
e7cc61eb9a chore: Auto Update Game Resources - 2025-12-31
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20622568070

[skip changelog]
2025-12-31 16:07:06 +00:00
Constrat
25a9712102 perf: optimize LoneTrail templates 2025-12-31 16:51:47 +01:00
Constrat
3ac22778d8 fix: EN Sami floor detection regex 2025-12-31 15:51:49 +01:00
MistEO
be7159f554 fix: bad reference 2025-12-31 22:43:12 +08:00
MistEO
da0445ddbc refactor: 减少string_view滥用 2025-12-31 22:13:53 +08:00
MistEO
b5dff5a285 Revert "fix: 任务名字符串池的线程安全问题"
This reverts commit 824e774b2b.
2025-12-31 21:46:59 +08:00
MistEO
a5cd79a70e refactor: 统一 DEBUG_VERSION 2025-12-31 21:38:44 +08:00
status102
35d31555b0 fix: 盲点撤退兜底 2025-12-31 20:59:23 +08:00
status102
aa34f54f22 fix: 自动战斗在未存在 debug/map 路径时无法生成地图截图 2025-12-31 20:59:23 +08:00
uye
824e774b2b fix: 任务名字符串池的线程安全问题 2025-12-31 20:03:58 +08:00
Status102
9f002b8f16 fix: 大地图技能, 撤离按钮及相机偏移修复, 连带引航者S6地图TN-2 ~ TN-4 view[1] (#15252)
* chore: TN-2

* fix: 技能&撤退 大地图视角偏移

Co-authored-by: status102 <102887808+status102@users.noreply.github.com>

* chore: TN-3&TN-4

* perf: const

---------

Co-authored-by: Weiyou Wang <44151844+Alan-Charred@users.noreply.github.com>
2025-12-31 20:03:37 +08:00
Manicsteiner
e5cf3be9ed chore: YostarJP copper regex 2025-12-31 16:38:22 +08:00
Constrat
02bf291f85 fix: Copper regex for Sui Garden EN 2025-12-30 13:09:51 +01:00
Manicsteiner
32ab6ce890 chore: YostarJP roguelike JieGarden ocr edit 2025-12-30 18:38:47 +08:00
uye
e95f7e9a78 fix: 满线索再放入 2025-12-30 15:04:31 +08:00
github-actions[bot]
98e26cd9de chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20582634976
[skip changelog]
2025-12-29 21:04:35 +00:00
HY
be19d7c5a8 chore: 繁中服「紅絲絨」活動導航 (#15234) 2025-12-29 18:17:04 +01:00
SherkeyXD
4741a8f6d2 feat: 添加孤星主题配置 2025-12-29 21:41:20 +08:00
SherkeyXD
d43b416837 feat: 添加孤星主题模板图 2025-12-29 21:41:20 +08:00
SherkeyXD
5d20d86080 feat: 优化 ImageCropper 输出 2025-12-29 21:41:20 +08:00
SherkeyXD
0d446c83dd chore: update template tool 2025-12-29 21:41:20 +08:00
uye
2b4dc643ed Release v6.1.0 (#15216)
## Summary by Sourcery

发布 v6.1.0,新增玩法自动化支持、增强日志与更新体验、大幅优化识别与模板,并带来多项稳定性与开发工具改进。

New Features:
- 在全服务器上新增 Hidden Front 玩法的全流程自动化支持。
- 为 Yostar JP/KR/EN 服务器新增类肉鸽玩法(JieGarden)的自动化支持。
- 引入悬浮日志窗口与托盘开关,用于实时查看自动战斗日志。
- 支持点击主窗口中的更新提示,直接触发更新流程。
- 新增对极寒保全(Extreme Cold Security,保全)委托与相关战斗的自动化支持。
- 在线索栏已满时支持一键放置线索。
- 在 WPF 日志系统中支持按日志级别输出到文件。

Bug Fixes:
- 修复多处更新流程问题,包括缓存文件夹拷贝、过期 OTA 包处理,以及在无可用 OTA 补丁时的错误提示信息。
- 修复 macOS 上 asst.log 被意外清空的问题,以及路径字符串含首尾空白或控制字符时导致的报错。
- 在更新进行中时正确禁用“检查更新”按钮。
- 解决日志、UI 变化与加载指示器之间的时序不匹配问题,避免因此造成的误识别。
- 修复 ROI 越界错误以及更新工具异常。
- 修复自动战斗流程问题,包括借助战后卡在好友添加界面、因布阵过快/模拟器卡顿导致的误触,以及在网络波动下确认编队失败等。
- 修复财富道具(通宝/铜钱)识别与死锁问题,并提升跨多服务器与多语言环境下的 OCR/正则与模板精度。

Enhancements:
- 打磨悬浮窗口布局与交互体验。
- 重构并优化模板资源与索引,以提升加载与识别性能。
- 缓存 ProcessTask 结果并优化 StableHash,减少重复计算并提升一致性。
- 在工具链中统一从源分辨率到目标分辨率的截图缩放逻辑。
- 通过切换到 boost::regex 改进基础设施规划刷新 API 与正则性能。
- 在拖动悬浮窗口时保持可见,避免与部分应用搭配时出现闪烁。
- 更新 macOS CMake 配置、C# EditorConfig 与开发工具,移除过时的 lint/格式化配置。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Release v6.1.0 with new gameplay automation support, enhanced logging
and update experience, broad recognition/template optimizations, and
multiple stability and tooling improvements.

New Features:
- Add full Hidden Front gameplay automation support across servers.
- Add roguelike (JieGarden) automation support for Yostar JP/KR/EN
servers.
- Introduce a floating log window and tray toggle for real-time
auto-battle log viewing.
- Allow clicking the main window update notification to directly trigger
the update process.
- Add automation support for new Extreme Cold Security (保全) assignments
and related battles.
- Enable one-click clue placement when clue slots are full.
- Support level-based log file output in the WPF logging system.

Bug Fixes:
- Fix multiple update flow issues including cache folder copying, stale
OTA packages, and incorrect messaging when no OTA patch is available.
- Fix asst.log being unexpectedly cleared on macOS and path strings with
surrounding whitespace or control characters causing errors.
- Disable the update check button correctly while an update is in
progress.
- Resolve timing-related mismatches between logs, UI changes, and
loading indicators that caused misrecognition.
- Fix ROI out-of-range errors and update tool exceptions.
- Fix auto-battle flow issues including being stuck on friend add after
borrowing support, misclicks due to fast formations/emulator lag, and
failures confirming lineups under network fluctuations.
- Fix treasury item (通宝/铜钱) recognition and deadlock issues, and improve
OCR/regex and template accuracy across multiple servers and languages.

Enhancements:
- Refine floating window layout and interaction experience.
- Refactor and optimize template resources and indexing to improve
loading and recognition performance.
- Cache ProcessTask results and optimize StableHash to reduce repeated
computation and improve consistency.
- Standardize screenshot scaling from source to target resolution in
tooling.
- Improve infrastructure plan refresh API and regex performance by
switching to boost::regex.
- Keep the floating window visible while moving to avoid flicker with
certain applications.
- Update macOS CMake config, C# EditorConfig, and developer tooling,
removing outdated lint/format configs.

</details>
2025-12-29 21:20:11 +08:00
uye
b2cbde245e docs: 更新 changelog 2025-12-29 21:07:30 +08:00
Constrat
a7603b66cd fix: use delay for all client
cc @HX3N
2025-12-29 13:59:53 +01:00
github-actions[bot]
66baf1be55 chore: Auto Update Game Resources - 2025-12-29
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20569894345

[skip changelog]
2025-12-29 09:48:45 +00:00
uye
5433a52b24 fix: 有猪把切换主题改炸了 2025-12-29 17:42:15 +08:00
uye
2e0d0e1313 debug: 打这么多日志真有人看吗 2025-12-29 17:42:00 +08:00
uye
744605548c chore: 调整倍战超过限制提示 2025-12-29 16:53:15 +08:00
github-actions[bot]
7585be794b chore: Auto Update Game Resources - 2025-12-29
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20567964907

[skip changelog]
2025-12-29 08:05:00 +00:00
github-actions[bot]
822d509455 chore: Auto Update Game Resources - 2025-12-29
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20567450539

[skip changelog]
2025-12-29 07:30:08 +00:00
github-actions[bot]
36d59a1f7f chore: Auto Update Game Resources - 2025-12-28
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20558862532

[skip changelog]
2025-12-28 20:04:05 +00:00
Constrat
5949146267 fix: typo 2025-12-28 19:26:57 +01:00
SherkeyXD
9cf5b65be2 rft: 优化多主题路径 2025-12-29 01:01:05 +08:00
status102
f5c5417f6b fix: 自定义基建选择被错误重置 2025-12-28 23:27:56 +08:00
Manicsteiner
e935a04674 chore: YostarJP Roguelike StartExploreCD for JieGarden 2025-12-28 23:15:36 +08:00
Constrat
f2460215ac fix: missing StartExploreCD for Sui EN
fix #15225
2025-12-28 15:50:24 +01:00
status102
367b513cc8 fix: 刷理智设置的基建计划绑定失效
link to #15222
2025-12-28 11:08:39 +08:00
Constrat
d477412cab chore: remove dupes from ocrREplaces EN 2025-12-28 00:36:32 +01:00
HX3N
e3170cef94 fix: YostarKR stuck after send clues (#15223) 2025-12-28 05:05:08 +09:00
github-actions[bot]
54f40c2708 chore: auto blame ignore
[skip changelog]
2025-12-27 15:35:18 +00:00
Constrat
1944164d9c fix: typo for blame_ignore.yml 2025-12-27 16:27:33 +01:00
uye
16d9d812b8 docs: Update CHANGELOG with recent changes and fixes
Added new features, improvements, and fixes to the application.
2025-12-27 20:48:28 +08:00
晓丶梦丶仁
ade38a68a0 perf: move_camera 允许微调镜头 (#15220) 2025-12-27 20:41:51 +08:00
Constrat
45ab2e7ba5 ci(fix): continue on error required for blame ignore\npost 22.04 to 24.04 ubuntu migration 2025-12-27 10:44:43 +01:00
Fryze
581df2fc7b i18n: Update ko-kr.xaml (#15213) 2025-12-27 14:37:01 +09:00
uye
a7a5d44276 fix: 引航者试炼借助战 2025-12-27 12:43:02 +08:00
github-actions[bot]
52561a7a7c docs: Auto Update Changelogs of v6.1.0 (#15215)
* docs: Auto Generate Changelog of Release v6.1.0

* Release v6.1.0 with new features and bug fixes

This release includes new features such as Hidden Front support, improvements to Roguelike gameplay across Yostar servers, a floating log window for auto-battle logs, and a clickable update notification for easier upgrades. Several bug fixes and optimizations were also implemented to enhance overall performance and user experience.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2025-12-27 12:29:20 +08:00
github-actions[bot]
48c518c80b chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20529356176
[skip changelog]
2025-12-26 21:04:24 +00:00
uye
62c407c81d Release v6.1.0-beta.4 (#15208)
## Summary by Sourcery

优化自定义基建排程、肉鸽源石锭处理以及若干游戏内任务行为,并更新相关工具链、本地化以及 CI / pre-commit 配置。

New Features:
- 引入强类型的 `CustomInfrastConfig`
模型和新的选择机制,以支持基于时间和基于索引的自定义基建方案,并支持序列化到辅助任务中。
- 新增 YoStarJP SecretFront 任务配置,并在叠加层中支持 SSS Copilot 任务链日志记录。

Bug Fixes:
- 修复自定义基建方案解析与选择逻辑,包括更安全的配置默认值、更好地处理缺失的时段,以及在文件无效或方案不完整时提供更健壮的日志。
- 确保 Secret Front 关卡名称 OCR 使用可配置的 ROI,并通过重试机制让战斗编队中的支援干员入场更加稳健。
- 改进当游戏窗口移动时叠加层窗口的行为,并限制叠加层最大宽度以获得更好的布局效果。
- 将被跳过的肉鸽源石锭拾取/兑换流程视为非致命问题并细化日志记录,避免不必要的任务失败。
- 防止在更新检查运行过程中退出应用,并调整基建附加检查逻辑以适配新的自定义方案列表模型。

Enhancements:
- 现代化基建设置中的配置访问方式,并将自定义方案刷新逻辑简化为单一的解析/刷新流程。
- 优化基于时间的自定义方案显示刷新,以及自动在运行后切换方案与相关日志记录。
- 收紧 `TaskData` 的 loading-justreturn 检查,以覆盖更多加载类任务类型。
- 对各类实用脚本和测试应用多处 Python 及工具链格式清理。
- 调整 GitHub Actions 工作流,使用 Prek 来执行定时的 pre-commit 运行,并改进针对 PR 与直接推送的 PNG
优化逻辑,同时更新 devcontainer 中的 Python 工具链以使用 Ruff 替代 Black/Isort。

Build:
- 将 pre-commit 钩子更新到较新版本,用 Ruff 替换 Black/Isort 进行 Python
格式化,并微调优化模板工具的输出格式。

CI:
- 用 Prek GitHub Action 替代自定义的基于 Python 的定时 pre-commit 任务,并优化
optimize-templates 工作流逻辑,以更好地区分直接推送与 PR 合并。

Documentation:
- 修复日文入门手册中轻微的表格格式与对齐问题。

Tests:
- 整理 AutoLocalization XAML 解析器测试,不改变其现有行为。

Chores:
- 添加或调整多处任务/资源 JSON 与 XAML 本地化文件,并更新 CLI 与视图 XAML,使其与新的行为和资源保持一致。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine custom infrastructure scheduling, roguelike copper handling, and
several gameplay task behaviors while updating tooling, localization,
and CI/pre-commit setup.

New Features:
- Introduce a strongly typed CustomInfrastConfig model and new selection
mechanism to support time-based and index-based custom infrastructure
plans, including serialization to assistant tasks.
- Add a YoStarJP SecretFront task configuration and support SSS Copilot
task chain logging in the overlay.

Bug Fixes:
- Fix custom infrastructure plan parsing and selection, including safer
configuration defaults, better handling of missing periods, and more
robust logging when files are invalid or plans are incomplete.
- Ensure Secret Front stage name OCR uses a configurable ROI and make
battle formation support-unit entry more resilient with retries.
- Improve overlay window behavior when the game window moves and clamp
overlay width to a maximum for better layout.
- Treat skipped roguelike copper pickup/exchange flows as non-fatal and
refine logging, preventing unnecessary task failures.
- Prevent exiting the app while an update check is running and adjust
infrast append checks to reflect the new custom plan list model.

Enhancements:
- Modernize config access patterns in infrastructure settings and
simplify custom plan refresh logic into a single parsing/refresh flow.
- Refine time-based custom plan display refresh and automatic post-run
plan switching and logging.
- Tighten TaskData loading-justreturn checks for additional loading task
types.
- Apply assorted Python and tooling formatting cleanups across utility
scripts and tests.
- Adjust GitHub Actions workflows to use Prek for scheduled pre-commit
runs and improve PNG optimization logic for PR vs direct pushes, while
updating devcontainer Python tooling to use Ruff instead of Black/Isort.

Build:
- Update pre-commit hooks to newer versions, replace Black/Isort with
Ruff for Python formatting, and tweak optimization template tooling
output formatting.

CI:
- Replace the custom Python-based pre-commit scheduled job with the Prek
GitHub Action and refine the optimize-templates workflow logic for
detecting direct pushes vs PR merges.

Documentation:
- Fix minor table formatting and alignment issues in the Japanese
introduction manual.

Tests:
- Tidy AutoLocalization XAML parser tests without changing behavior.

Chores:
- Add or adjust various task/resource JSON and XAML localization files,
plus CLI and view XAML tweaks, to align with the new behaviors and
resources.

</details>

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

优化自定义基建排程、肉鸽源石锭处理以及若干游戏内任务行为,并更新相关工具链、本地化以及 CI / pre-commit 配置。

New Features:
- 引入强类型的 `CustomInfrastConfig`
模型和新的选择机制,以支持基于时间和基于索引的自定义基建方案,并支持序列化到辅助任务中。
- 新增 YoStarJP SecretFront 任务配置,并在叠加层中支持 SSS Copilot 任务链日志记录。

Bug Fixes:
- 修复自定义基建方案解析与选择逻辑,包括更安全的配置默认值、更好地处理缺失的时段,以及在文件无效或方案不完整时提供更健壮的日志。
- 确保 Secret Front 关卡名称 OCR 使用可配置的 ROI,并通过重试机制让战斗编队中的支援干员入场更加稳健。
- 改进当游戏窗口移动时叠加层窗口的行为,并限制叠加层最大宽度以获得更好的布局效果。
- 将被跳过的肉鸽源石锭拾取/兑换流程视为非致命问题并细化日志记录,避免不必要的任务失败。
- 防止在更新检查运行过程中退出应用,并调整基建附加检查逻辑以适配新的自定义方案列表模型。

Enhancements:
- 现代化基建设置中的配置访问方式,并将自定义方案刷新逻辑简化为单一的解析/刷新流程。
- 优化基于时间的自定义方案显示刷新,以及自动在运行后切换方案与相关日志记录。
- 收紧 `TaskData` 的 loading-justreturn 检查,以覆盖更多加载类任务类型。
- 对各类实用脚本和测试应用多处 Python 及工具链格式清理。
- 调整 GitHub Actions 工作流,使用 Prek 来执行定时的 pre-commit 运行,并改进针对 PR 与直接推送的 PNG
优化逻辑,同时更新 devcontainer 中的 Python 工具链以使用 Ruff 替代 Black/Isort。

Build:
- 将 pre-commit 钩子更新到较新版本,用 Ruff 替换 Black/Isort 进行 Python
格式化,并微调优化模板工具的输出格式。

CI:
- 用 Prek GitHub Action 替代自定义的基于 Python 的定时 pre-commit 任务,并优化
optimize-templates 工作流逻辑,以更好地区分直接推送与 PR 合并。

Documentation:
- 修复日文入门手册中轻微的表格格式与对齐问题。

Tests:
- 整理 AutoLocalization XAML 解析器测试,不改变其现有行为。

Chores:
- 添加或调整多处任务/资源 JSON 与 XAML 本地化文件,并更新 CLI 与视图 XAML,使其与新的行为和资源保持一致。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine custom infrastructure scheduling, roguelike copper handling, and
several gameplay task behaviors while updating tooling, localization,
and CI/pre-commit setup.

New Features:
- Introduce a strongly typed CustomInfrastConfig model and new selection
mechanism to support time-based and index-based custom infrastructure
plans, including serialization to assistant tasks.
- Add a YoStarJP SecretFront task configuration and support SSS Copilot
task chain logging in the overlay.

Bug Fixes:
- Fix custom infrastructure plan parsing and selection, including safer
configuration defaults, better handling of missing periods, and more
robust logging when files are invalid or plans are incomplete.
- Ensure Secret Front stage name OCR uses a configurable ROI and make
battle formation support-unit entry more resilient with retries.
- Improve overlay window behavior when the game window moves and clamp
overlay width to a maximum for better layout.
- Treat skipped roguelike copper pickup/exchange flows as non-fatal and
refine logging, preventing unnecessary task failures.
- Prevent exiting the app while an update check is running and adjust
infrast append checks to reflect the new custom plan list model.

Enhancements:
- Modernize config access patterns in infrastructure settings and
simplify custom plan refresh logic into a single parsing/refresh flow.
- Refine time-based custom plan display refresh and automatic post-run
plan switching and logging.
- Tighten TaskData loading-justreturn checks for additional loading task
types.
- Apply assorted Python and tooling formatting cleanups across utility
scripts and tests.
- Adjust GitHub Actions workflows to use Prek for scheduled pre-commit
runs and improve PNG optimization logic for PR vs direct pushes, while
updating devcontainer Python tooling to use Ruff instead of Black/Isort.

Build:
- Update pre-commit hooks to newer versions, replace Black/Isort with
Ruff for Python formatting, and tweak optimization template tooling
output formatting.

CI:
- Replace the custom Python-based pre-commit scheduled job with the Prek
GitHub Action and refine the optimize-templates workflow logic for
detecting direct pushes vs PR merges.

Documentation:
- Fix minor table formatting and alignment issues in the Japanese
introduction manual.

Tests:
- Tidy AutoLocalization XAML parser tests without changing behavior.

Chores:
- Add or adjust various task/resource JSON and XAML localization files,
plus CLI and view XAML tweaks, to align with the new behaviors and
resources.

</details>

</details>

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

优化自定义基建排程、肉鸽源石锭处理以及若干游戏内任务行为,并更新相关工具链、本地化以及 CI / pre-commit 配置。

New Features:
- 引入强类型的 `CustomInfrastConfig`
模型和新的选择机制,以支持基于时间和基于索引的自定义基建方案,并支持序列化到辅助任务中。
- 新增 YoStarJP SecretFront 任务配置,并在叠加层中支持 SSS Copilot 任务链日志记录。

Bug Fixes:
- 修复自定义基建方案解析与选择逻辑,包括更安全的配置默认值、更好地处理缺失的时段,以及在文件无效或方案不完整时提供更健壮的日志。
- 确保 Secret Front 关卡名称 OCR 使用可配置的 ROI,并通过重试机制让战斗编队中的支援干员入场更加稳健。
- 改进当游戏窗口移动时叠加层窗口的行为,并限制叠加层最大宽度以获得更好的布局效果。
- 将被跳过的肉鸽源石锭拾取/兑换流程视为非致命问题并细化日志记录,避免不必要的任务失败。
- 防止在更新检查运行过程中退出应用,并调整基建附加检查逻辑以适配新的自定义方案列表模型。

Enhancements:
- 现代化基建设置中的配置访问方式,并将自定义方案刷新逻辑简化为单一的解析/刷新流程。
- 优化基于时间的自定义方案显示刷新,以及自动在运行后切换方案与相关日志记录。
- 收紧 `TaskData` 的 loading-justreturn 检查,以覆盖更多加载类任务类型。
- 对各类实用脚本和测试应用多处 Python 及工具链格式清理。
- 调整 GitHub Actions 工作流,使用 Prek 来执行定时的 pre-commit 运行,并改进针对 PR 与直接推送的 PNG
优化逻辑,同时更新 devcontainer 中的 Python 工具链以使用 Ruff 替代 Black/Isort。

Build:
- 将 pre-commit 钩子更新到较新版本,用 Ruff 替换 Black/Isort 进行 Python
格式化,并微调优化模板工具的输出格式。

CI:
- 用 Prek GitHub Action 替代自定义的基于 Python 的定时 pre-commit 任务,并优化
optimize-templates 工作流逻辑,以更好地区分直接推送与 PR 合并。

Documentation:
- 修复日文入门手册中轻微的表格格式与对齐问题。

Tests:
- 整理 AutoLocalization XAML 解析器测试,不改变其现有行为。

Chores:
- 添加或调整多处任务/资源 JSON 与 XAML 本地化文件,并更新 CLI 与视图 XAML,使其与新的行为和资源保持一致。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine custom infrastructure scheduling, roguelike copper handling, and
several gameplay task behaviors while updating tooling, localization,
and CI/pre-commit setup.

New Features:
- Introduce a strongly typed CustomInfrastConfig model and new selection
mechanism to support time-based and index-based custom infrastructure
plans, including serialization to assistant tasks.
- Add a YoStarJP SecretFront task configuration and support SSS Copilot
task chain logging in the overlay.

Bug Fixes:
- Fix custom infrastructure plan parsing and selection, including safer
configuration defaults, better handling of missing periods, and more
robust logging when files are invalid or plans are incomplete.
- Ensure Secret Front stage name OCR uses a configurable ROI and make
battle formation support-unit entry more resilient with retries.
- Improve overlay window behavior when the game window moves and clamp
overlay width to a maximum for better layout.
- Treat skipped roguelike copper pickup/exchange flows as non-fatal and
refine logging, preventing unnecessary task failures.
- Prevent exiting the app while an update check is running and adjust
infrast append checks to reflect the new custom plan list model.

Enhancements:
- Modernize config access patterns in infrastructure settings and
simplify custom plan refresh logic into a single parsing/refresh flow.
- Refine time-based custom plan display refresh and automatic post-run
plan switching and logging.
- Tighten TaskData loading-justreturn checks for additional loading task
types.
- Apply assorted Python and tooling formatting cleanups across utility
scripts and tests.
- Adjust GitHub Actions workflows to use Prek for scheduled pre-commit
runs and improve PNG optimization logic for PR vs direct pushes, while
updating devcontainer Python tooling to use Ruff instead of Black/Isort.

Build:
- Update pre-commit hooks to newer versions, replace Black/Isort with
Ruff for Python formatting, and tweak optimization template tooling
output formatting.

CI:
- Replace the custom Python-based pre-commit scheduled job with the Prek
GitHub Action and refine the optimize-templates workflow logic for
detecting direct pushes vs PR merges.

Documentation:
- Fix minor table formatting and alignment issues in the Japanese
introduction manual.

Tests:
- Tidy AutoLocalization XAML parser tests without changing behavior.

Chores:
- Add or adjust various task/resource JSON and XAML localization files,
plus CLI and view XAML tweaks, to align with the new behaviors and
resources.

</details>

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

优化自定义基建排程、肉鸽源石锭处理以及若干游戏内任务行为,并更新相关工具链、本地化以及 CI / pre-commit 配置。

New Features:
- 引入强类型的 `CustomInfrastConfig`
模型和新的选择机制,以支持基于时间和基于索引的自定义基建方案,并支持序列化到辅助任务中。
- 新增 YoStarJP SecretFront 任务配置,并在叠加层中支持 SSS Copilot 任务链日志记录。

Bug Fixes:
- 修复自定义基建方案解析与选择逻辑,包括更安全的配置默认值、更好地处理缺失的时段,以及在文件无效或方案不完整时提供更健壮的日志。
- 确保 Secret Front 关卡名称 OCR 使用可配置的 ROI,并通过重试机制让战斗编队中的支援干员入场更加稳健。
- 改进当游戏窗口移动时叠加层窗口的行为,并限制叠加层最大宽度以获得更好的布局效果。
- 将被跳过的肉鸽源石锭拾取/兑换流程视为非致命问题并细化日志记录,避免不必要的任务失败。
- 防止在更新检查运行过程中退出应用,并调整基建附加检查逻辑以适配新的自定义方案列表模型。

Enhancements:
- 现代化基建设置中的配置访问方式,并将自定义方案刷新逻辑简化为单一的解析/刷新流程。
- 优化基于时间的自定义方案显示刷新,以及自动在运行后切换方案与相关日志记录。
- 收紧 `TaskData` 的 loading-justreturn 检查,以覆盖更多加载类任务类型。
- 对各类实用脚本和测试应用多处 Python 及工具链格式清理。
- 调整 GitHub Actions 工作流,使用 Prek 来执行定时的 pre-commit 运行,并改进针对 PR 与直接推送的 PNG
优化逻辑,同时更新 devcontainer 中的 Python 工具链以使用 Ruff 替代 Black/Isort。

Build:
- 将 pre-commit 钩子更新到较新版本,用 Ruff 替换 Black/Isort 进行 Python
格式化,并微调优化模板工具的输出格式。

CI:
- 用 Prek GitHub Action 替代自定义的基于 Python 的定时 pre-commit 任务,并优化
optimize-templates 工作流逻辑,以更好地区分直接推送与 PR 合并。

Documentation:
- 修复日文入门手册中轻微的表格格式与对齐问题。

Tests:
- 整理 AutoLocalization XAML 解析器测试,不改变其现有行为。

Chores:
- 添加或调整多处任务/资源 JSON 与 XAML 本地化文件,并更新 CLI 与视图 XAML,使其与新的行为和资源保持一致。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine custom infrastructure scheduling, roguelike copper handling, and
several gameplay task behaviors while updating tooling, localization,
and CI/pre-commit setup.

New Features:
- Introduce a strongly typed CustomInfrastConfig model and new selection
mechanism to support time-based and index-based custom infrastructure
plans, including serialization to assistant tasks.
- Add a YoStarJP SecretFront task configuration and support SSS Copilot
task chain logging in the overlay.

Bug Fixes:
- Fix custom infrastructure plan parsing and selection, including safer
configuration defaults, better handling of missing periods, and more
robust logging when files are invalid or plans are incomplete.
- Ensure Secret Front stage name OCR uses a configurable ROI and make
battle formation support-unit entry more resilient with retries.
- Improve overlay window behavior when the game window moves and clamp
overlay width to a maximum for better layout.
- Treat skipped roguelike copper pickup/exchange flows as non-fatal and
refine logging, preventing unnecessary task failures.
- Prevent exiting the app while an update check is running and adjust
infrast append checks to reflect the new custom plan list model.

Enhancements:
- Modernize config access patterns in infrastructure settings and
simplify custom plan refresh logic into a single parsing/refresh flow.
- Refine time-based custom plan display refresh and automatic post-run
plan switching and logging.
- Tighten TaskData loading-justreturn checks for additional loading task
types.
- Apply assorted Python and tooling formatting cleanups across utility
scripts and tests.
- Adjust GitHub Actions workflows to use Prek for scheduled pre-commit
runs and improve PNG optimization logic for PR vs direct pushes, while
updating devcontainer Python tooling to use Ruff instead of Black/Isort.

Build:
- Update pre-commit hooks to newer versions, replace Black/Isort with
Ruff for Python formatting, and tweak optimization template tooling
output formatting.

CI:
- Replace the custom Python-based pre-commit scheduled job with the Prek
GitHub Action and refine the optimize-templates workflow logic for
detecting direct pushes vs PR merges.

Documentation:
- Fix minor table formatting and alignment issues in the Japanese
introduction manual.

Tests:
- Tidy AutoLocalization XAML parser tests without changing behavior.

Chores:
- Add or adjust various task/resource JSON and XAML localization files,
plus CLI and view XAML tweaks, to align with the new behaviors and
resources.

</details>

</details>

</details>
2025-12-27 00:42:45 +08:00
github-actions[bot]
d368dca271 docs: Auto Update Changelogs of v6.1.0-beta.4 (#15209)
* docs: Auto Generate Changelog of Release v6.1.0-beta.4

* docs: Update CHANGELOG with recent improvements and fixes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2025-12-27 00:01:27 +08:00
Constrat
fc60270576 feat(tools): add ability to remove unused templates (#15207) 2025-12-26 16:37:39 +01:00
uye
d7b1c83baa fix: 部分情况下无法进入借助战界面 2025-12-26 23:07:36 +08:00
Constrat
e68db16dce perf: reoptimize ALL templates from scratch 2025-12-26 15:59:20 +01:00
白隐Hakuin
4f8bf54398 feat: 更新期间退出应用添加二次确认 (#14964)
* feat: 防止资源更新期间退出应用

- 在应用关闭前检查资源更新状态
- 若资源更新进行中,弹出确认对话框提示用户
- 防止解压过程中意外关闭导致资源更新异常
- 新增本地化字符串用于资源更新确认提示

* fix: 修复编译错误 - 局部变量重复声明

- 修改第二个 MessageBoxHelper.Show() 返回值变量名为 confirmResult
- 避免在同一方法作用域内重复声明 result 变量

* chore: 更新版本更新的退出确认对话框

将ResourceUpdateInProgress本地化字符串替换为UpdateConfirmExit
在版本更新期间退出时提供更清晰的消息传递。

* i18n: 翻译

---------

Co-authored-by: Hakuin123 <hakuin123@github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2025-12-26 22:47:14 +08:00
Status102
23d54a51c6 fix: LoadingText 结束后 UI 延迟变化导致误匹配 (#15198)
* fix: LoadingText 结束后 UI 延迟变化导致误匹配

* fix: task check
2025-12-26 22:36:57 +08:00
Fryze
2a2cfec777 fix: roi out of range (#15204)
* fix: roi out of range

* fix: roi out of range in base.json
2025-12-26 22:28:20 +08:00
Constrat
d988d2537c ci: fix for optimize templates
- fixed wrong condition
- xargs -> jq for better checking
2025-12-26 14:45:57 +01:00
Constrat
e1d0432e09 fix: sendclue reception standardize templates (#15205)
fix: standardize template for all clients
2025-12-26 14:31:00 +01:00
github-actions[bot]
3835659ac9 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20511398549
[skip changelog]
2025-12-25 21:52:28 +00:00
uye
ac8680d768 fix: 前往上一次作战增加重试
fix #15202
2025-12-26 03:23:34 +08:00
travellerse
8c6b3bf559 fix: 修复通宝拾取时卡死并删除m_retry_times=1 (#15197)
* fix: 使用return true进入next替代通宝插件范围的retry_times=1

* fix: 优化通宝插件任务的返回结果
2025-12-26 03:18:12 +08:00
uye
aa1b267278 perf: 优化悬浮窗布局 2025-12-26 03:06:45 +08:00
status102
017c6bdce5 fix: 基建自定义配置迁移加个try 2025-12-26 02:25:52 +08:00
SherkeyXD
ccd5d30ac0 chore: 更新 pre-commit 配置 2025-12-26 00:53:35 +08:00
github-actions[bot]
e20f02c5d2 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20508148724
[skip changelog]
2025-12-25 16:53:07 +00:00
SherkeyXD
925bb69111 chore: 移除 isort/black 配置 2025-12-26 00:50:55 +08:00
SherkeyXD
232d4adb04 chore: update pre-commit toolchain (#15179) 2025-12-26 00:50:14 +08:00
SherkeyXD
2bae56659b chore: devcontainer 迁移至 ruff 2025-12-26 00:48:18 +08:00
SherkeyXD
b70d662a3e chore: 修复 roi updater 工具的问题 2025-12-26 00:44:27 +08:00
uye
25222f6e9a fix: 保全自动战斗日志悬浮窗 2025-12-25 22:47:19 +08:00
uye
25786dabeb fix: 保全派驻因网络波动可能无法点击阵容确认 2025-12-25 22:11:15 +08:00
uye
b8b020e839 fix: 未设置自定义基建排班路径时第一次启动会报错 2025-12-25 21:37:23 +08:00
uye
45162e093e chore: 悬浮窗移动时不隐藏,避免某些窗口点击就会触发闪烁(说的就是 QQ) 2025-12-25 21:28:11 +08:00
Status102
61fbba4b12 fix: 自定义基建计划指定某个计划后会在1分钟后被重置为定时计划 (#14649)
* fix: 选中计划转换

fix: 解析警告

rft: 重构完成

perf: 移除_customInfrastPlanHasPeriod

rft: 设置读取

perf: 加上数量检查

i18n: warning

fix: 基建自定义计划手动选择后依旧会被时间刷新

* i18n: placehold

* i18n: KR

* i18n: EN

* fix: 时间轮换UI刷新错误

---------

Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-12-25 19:41:21 +08:00
Manicsteiner
86376c9118 feat: YostarJP SecretFront edit (#15191) 2025-12-25 15:11:57 +08:00
Constrat
dcc2c05aee Release v6.1.0-beta.3 (#15188) 2025-12-25 01:24:50 +01:00
github-actions[bot]
48315226dd docs: Auto Update Changelogs of v6.1.0-beta.3 (#15195)
* docs: Auto Generate Changelog of Release v6.1.0-beta.3

* docs: highlight

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-12-25 01:24:23 +01:00
github-actions[bot]
7817b15929 chore: Auto Update Game Resources - 2025-12-24
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20493071706

[skip changelog]
2025-12-24 20:03:47 +00:00
萨拉托加
b683cdc400 fix: 避免肉鸽快速编队点太快可能点不上
还是先加500吧,不够再加
2025-12-24 21:27:12 +08:00
萨拉托加
9d24679cab fix: 肉鸽因模拟器卡顿可能点进招募界面 2025-12-24 21:12:08 +08:00
Constrat
957f821976 fix: allow usage of CLI build instead of only VS (#15190)
* fix: change solutiondir to msbuildproject

* chore: perhaps a better solution
2025-12-24 14:08:20 +01:00
Manicsteiner
b1d7950843 chore: YostarJP roguelike JieGarden ocr edit 2025-12-24 21:02:12 +08:00
萨拉托加
0bb546d1d8 fix: 萨米积冰岩骸识别 2025-12-24 20:58:22 +08:00
Constrat
49ad57dc2c i18n: EN typo 2025-12-24 13:47:35 +01:00
SherkeyXD
42d8699e63 chore: remove codeql workflow 2025-12-24 19:38:04 +08:00
uye
8dbc73e0fe perf: RefreshCustomInfrastPlanIndexByPeriod 支持传入当前时间 2025-12-24 19:12:38 +08:00
uye
0148b78711 fix: 保全关卡名识别 2025-12-24 19:05:09 +08:00
uye
dc50e93075 chore: 资源更新忽略 .gitignore 文件 2025-12-24 17:15:48 +08:00
uye
a5e7477b90 feat: 支持点击标题栏左上角的检测到新版本提示触发更新 2025-12-24 16:51:16 +08:00
uye
093320a4c8 fix: 两个检测更新的按钮在更新时禁用 2025-12-24 16:46:07 +08:00
uye
db2dfbce78 fix: 未勾选自动下载更新包且无可用的 OTA 增量更新包时仍然提示“将下载完整包xxx” 2025-12-24 16:42:04 +08:00
uye
c1a0d38037 feat: 右键图标菜单栏中增加日志悬浮窗切换 2025-12-24 16:09:47 +08:00
uye
2380db976b feat: 悬浮窗支持自动战斗日志源 2025-12-24 15:38:49 +08:00
Constrat
6f52b01076 perf: optimize templates for secrentfront 2025-12-24 00:46:06 +01:00
Constrat
4fd44e2315 feat: YostarEN SecretFront (Hidden Front) 2025-12-24 00:45:22 +01:00
github-actions[bot]
1cbe7e2670 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20471520173
[skip changelog]
2025-12-23 21:06:06 +00:00
github-actions[bot]
9d4a9b801b chore: Auto Update Game Resources - 2025-12-23
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20467704410

[skip changelog]
2025-12-23 17:47:53 +00:00
uye
442474cce1 feat: 隐秘战线 (#15115)
* feat: 隐秘战线

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 抵达终点

* chore: Auto update by pre-commit hooks [skip changelog]

* perf: 抑制一下低概率

* feat: ui 新增隐秘战线入口

* chore: Auto update by pre-commit hooks [skip changelog]

* i18n: zh-tw

* i18n: KR

* chore: fix typo

* i18n: JP

* chore: txwy update

* chore: Auto update by pre-commit hooks [skip changelog]

* i18n: placehold

* rft: roi to json

* i18n: 翻译

* chore: 插件只在传入对应任务时启用

* fix: 任务名错误

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: momomochi987 <as99us301@gmail.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Manicsteiner <Manicsteiner@outlook.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2025-12-24 01:43:35 +08:00
uye
5880499330 feat: 日志悬浮窗 (#15185)
* feat: 日志叠加层

* feat: 添加窗口选择和持久化保存

* rft: 调整部分后台代码至 vm 中

* feat: 选择列表添加 ProcessId 显示

* i18n: 翻译

* rft: 改用 CsWin32

* fix: MessageBoxResult ShowNative 报错

* chore: 移除多余的 PInvoke

* rft: OverlayViewModel 改用 PInvoke

* style: 编译警告

* rft: OverlayWindow.xaml.cs 改用 PInvoke

* perf: 优化显示效果,添加控制按钮

* chore: 改用 SetWindowLongPtr

* perf: 优化性能

* i18n: 翻译

* feat: 增加 TooltipBlock 提示

* fix: 中途开启不会滚动到日志最后一栏

* chore: 使用属性而不是字段

* chore: 注释

* fix: 窗口未显示的时候不会持久化保存目标窗口

* chore: 移除未使用变量
2025-12-24 01:23:42 +08:00
yali-hzy
419d3a6711 feat: 在任务开始后的禁用组件内也能查看tooltip (#15186) 2025-12-24 01:02:26 +08:00
Constrat
e0e037fd8d fix: more tongbaso regex en 2025-12-23 17:36:04 +01:00
Manicsteiner
7ca6845b35 chore: YostarJP roguelike JieGarden ocr edit 2025-12-23 23:24:11 +08:00
MistEO
55beea8593 refactor(core): 重构 ResourceLoader::load 资源加载逻辑 (#15132)
* refactor(core): 重构 ResourceLoader::load 资源加载逻辑

- 将函数内宏定义替换为类型安全的泛型 lambda
- 修复 _custom.json 路径计算错误(仅对 .json 文件生效)
- 使用循环和数组消除 Roguelike 配置的重复加载代码
- 添加结构化注释分隔符提升可读性
- 移除未使用的 AsyncLoadConfig 宏和错误的 #undef

* fix: 修复行为不一致

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-23 21:42:30 +08:00
Status102
801d656329 feat: ProcessTask任务命中缓存结果 (#12651)
* feat: ProcessTask任务命中缓存结果

* perf: 加个函数

* perf: 合并直接截图

* feat: 增加匹配模板及文字

* fix: win

* fix: ptr check

* fix: template func

* fix: type

* fix: import

* fix: empty

* perf: early retrun

* perf: shared image

* fix: import
2025-12-23 21:40:56 +08:00
github-actions[bot]
0cd1d1b63e chore: Auto Update Game Resources - 2025-12-23
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20462178052

[skip changelog]
2025-12-23 13:37:08 +00:00
status102
e71037a1b0 fix: 单切换账号时,任务运行计时错误 2025-12-23 21:23:48 +08:00
yali-hzy
fef77f5780 fix: 招募助战后补充低信赖干员数量不足 (#15184)
fix: 修正补充低信赖干员数量计算,考虑是否已经招募助战干员
2025-12-23 18:41:57 +08:00
Status102
ca9807ce09 chore: Update C# EditorConfig for c# 13 & 14 (#15146)
[blame ignore]
2025-12-23 17:11:48 +08:00
Constrat
32c6429825 fix: BattleStageName requiring ^$ for EN 2025-12-23 00:07:28 +01:00
HX3N
56f6ef419c i18n: KR improve client display names 2025-12-23 07:46:47 +09:00
Constrat
6532e29d88 fix: wrong template for EN 2025-12-22 23:25:53 +01:00
github-actions[bot]
1c294925d2 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20444930763
[skip changelog]
2025-12-22 21:52:47 +00:00
Constrat
58a0e07854 Release v6.1.0-beta.2 (#15172)
> [!IMPORTANT]
> - [x] #15167 ~~to be merged~~ merged

## Summary by Sourcery

更新 roguelike 任务配置、区域任务资源、韩语本地化字符串,以及面向即将到来的测试版发布的模板优化设置。

改进内容:
- 刷新多个地区的 roguelike 任务配置文件和共享任务资源。
- 调整 WPF GUI 中的韩语本地化资源。
- 为更新后的资源微调模板优化配置。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Update roguelike task configurations, regional task resources, Korean
localization strings, and template optimization settings for the
upcoming beta release.

Enhancements:
- Refresh roguelike task configuration files and shared task resources
for multiple regions.
- Adjust Korean localization resources in the WPF GUI.
- Tune template optimization configuration for updated assets.

</details>

## Summary by Sourcery

为 v6.1.0-beta.2 版本准备 Roguelike 任务处理、本地化资源和构建工具。

新特性:
- 将 Roguelike 铜币识别错误从核心任务插件上报到 WPF UI,以便进行用户可见的日志记录。

错误修复:
- 改进 Roguelike 铜币拾取行为,通过减少重试交换模式的次数,并在只检测到无效铜币时点击回退位置。

增强改进:
- 优化 macOS xcframework 的生成方式,以使用目标产物、专用构建目录以及对第三方 dylib 的动态发现。
- 调整 Roguelike 铜币调试图像的保存逻辑,以支持可选的自动清理。
- 刷新多个地区的 Roguelike 任务配置和共享任务资源。
- 更新 WPF 本地化资源(包括韩文字符串),以支持 Roguelike UI 和新增消息。
- 重新调校模板优化配置,使其与更新后的资源和素材保持一致。

CI:
- 将预定执行的 pre-commit 工作流更新为使用更高版本的 checkout 和 setup-python GitHub
Actions。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare roguelike task handling, localization resources, and build
tooling for the v6.1.0-beta.2 release.

New Features:
- Report roguelike copper recognition errors from the core task plugin
to the WPF UI for user-visible logging.

Bug Fixes:
- Improve roguelike copper pickup behavior by retrying exchange mode
fewer times and clicking a fallback position when only invalid coppers
are detected.

Enhancements:
- Refine macOS xcframework generation to use target outputs, a dedicated
build directory, and dynamic discovery of third-party dylibs.
- Adjust roguelike copper debug image saving to support optional
automatic cleanup.
- Refresh roguelike task configuration and shared task resources across
multiple regions.
- Update WPF localization resources, including Korean strings, for the
roguelike UI and new messages.
- Retune template optimization configuration to align with updated
assets and resources.

CI:
- Update scheduled pre-commit workflow to newer checkout and
setup-python GitHub Actions versions.

</details>
2025-12-22 18:18:37 +01:00
github-actions[bot]
e735da403c docs: Auto Update Changelogs of v6.1.0-beta.2 (#15135)
* docs: Auto Generate Changelog of Release v6.1.0-beta.2

* docs: early changelog. requires CN checking

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-12-22 18:12:22 +01:00
HX3N
b4b1aa69c6 chore: KR 同心 ocr 2025-12-23 02:11:51 +09:00
Constrat
69bc5bcf83 fix: more copper regex for EN 2025-12-22 18:11:16 +01:00
Constrat
250eebd81f fix: update GetDropSwitch for EN
to make it same size as CN for ROI Pickup reasons
2025-12-22 17:51:30 +01:00
travellerse
9bdfc02de5 fix: 完善通宝识别失败时的分支处理 (#15180) 2025-12-22 17:17:45 +01:00
github-actions[bot]
d75c028852 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20436912089
[skip changelog]
2025-12-22 15:52:36 +00:00
Constrat
a3ea60b014 fix: more tongbao EN regex 2025-12-22 16:45:09 +01:00
HY
6d72632617 chore: 繁中服保全派駐 8 清音安保派駐 (#15110)
* chore: sss8 txwy

* Revert "chore: sss8 txwy"

This reverts commit 75912772e2.

* chore: 拆出 text

* chore: 先把上個週期的作業移進 old

* chore: 把作業搬移的部分交給其他 PR

This reverts commit c3904dd896.
2025-12-22 16:37:25 +01:00
HY
1fd8c03e32 fix: SendClues for txwy (#15178) 2025-12-22 16:16:22 +01:00
travellerse
f155bc4867 fix: 通宝识别失败时放弃通宝 (#15167)
* fix: 通宝识别失败时放弃通宝

* fix: 初始化click_point_fallback

* fix: 通宝交换任务仅尝试2次

* fix: 不小心把调试用的传上去了

* fix: 所有通宝名称识别错误都发送反馈

* i18n: KR

* fix: Tongbao error info tweak

* perf: disable auto clean for Tongbao unknown debug image

* fix: Tongbao info case tweak

---------

Co-authored-by: HX3N <scarlet7518@gmail.com>
2025-12-22 16:15:40 +01:00
Manicsteiner
16da7903ba chore: YostarJP roguelike JieGarden ocr edit 2025-12-22 23:08:31 +08:00
HX3N
bee37d42ab chore: YostarKR JieGarden Encounter ocr 2025-12-22 22:59:48 +09:00
dependabot[bot]
a3d3b54fcf ci: bump the github-actions group in /.github/workflows with 2 updates (#15177)
Bumps the github-actions group in /.github/workflows with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-python](https://github.com/actions/setup-python).


Updates `actions/checkout` from 4 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

Updates `actions/setup-python` from 5 to 6
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-22 14:22:19 +01:00
Weiyou Wang
0072770349 chore(ci): 更新 macos.cmake (#15173) 2025-12-22 11:19:35 +08:00
Constrat
38b5d0332b fix: more Coppers EN regexes 2025-12-22 01:48:17 +01:00
github-actions[bot]
7937882099 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20415763013
[skip changelog]
2025-12-21 21:05:48 +00:00
Constrat
74256dc3d2 fix: missing Special Squad for EN 2025-12-21 21:34:26 +01:00
Constrat
c376af8dff fix: more regex for CoppersNameOcrReplace EN 2025-12-21 21:25:36 +01:00
HX3N
4846ad64e3 fix: SendClues for Yostar server (#15168)
* fix: SendClues

* chore: expand roi

* Revert "chore: expand roi"

This reverts commit b764d81792.
2025-12-21 19:32:03 +01:00
Constrat
573bd6f0a4 fix: Missing GetDropSelectRecruit for EN 2025-12-21 19:24:10 +01:00
Constrat
5c40c4b6e8 fix: missing CoppersAbandonExchange for EN 2025-12-21 16:47:18 +01:00
HX3N
78a27ebfa6 i18n: KR tweak InvestmentReach 2025-12-21 23:58:12 +09:00
Constrat
ee4f966f75 fix: tonbgbao regex for EN 2025-12-21 15:07:17 +01:00
github-actions[bot]
14f331e964 chore: Auto Templates Optimization
Triggered by 18dd3b2034

[skip changelog]
2025-12-21 13:23:25 +00:00
uye
18dd3b2034 feat:满线索再一键置入 2025-12-21 21:22:56 +08:00
Constrat
9c12b659cf Release v6.1.0-beta.1 (#15134)
Sui Garden for EN KR JP
2025-12-21 13:58:38 +01:00
Manicsteiner
365af6653d chore: YostarJP roguelike JieGarden ocr edits (#15162) 2025-12-21 13:56:47 +01:00
Constrat
b467138bee fix: regex off all double letters for EN coppers 2025-12-21 13:56:05 +01:00
HX3N
1539769b0c chore: YostarKR JieGarden ocr edit 2025-12-21 17:27:05 +09:00
萨拉托加
4400d05cfa feat: 极寒保全派驻作业 2025-12-21 11:25:50 +08:00
github-actions[bot]
970860d4f4 chore: Auto Update Game Resources - 2025-12-21
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20402818215

[skip changelog]
2025-12-21 01:32:03 +00:00
Constrat
3824fb1c3e fix: EN requires GetDropSwitch2 2025-12-21 02:06:25 +01:00
Constrat
aa9dc2ee4d fix: remove case sensitivity from CoppersNameOcrReplace 2025-12-20 22:48:03 +01:00
HX3N
66b95cb1e7 i18n: KR tweak translation for IS nodes, achievements and general UI 2025-12-21 06:43:59 +09:00
Constrat
c641e35ee5 i18n: EN tweak 2025-12-20 21:32:32 +01:00
status102
389812279d feat: Wpf日志文件输出分级 2025-12-21 00:59:38 +08:00
Constrat
e11a90e252 fix: Ruwu Gate ROI is too big and detects floor number (IV) 2025-12-20 16:20:37 +01:00
Constrat
ebc980f154 i18n: various tweaks to IS nodes and stages 2025-12-20 16:12:54 +01:00
github-actions[bot]
d44735e969 chore: Auto Templates Optimization
Triggered by 3916aa0211

[skip changelog]
2025-12-20 14:51:38 +00:00
Manicsteiner
3916aa0211 chore: YostarJP roguelike JieGarden edits (#15153) 2025-12-20 15:51:19 +01:00
Constrat
28267a5490 fix: use template instead of reduced score
thanks to @HX3N
2025-12-20 15:49:09 +01:00
github-actions[bot]
1bc27e05b2 chore: Auto Update Game Resources - 2025-12-20
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20395883077

[skip changelog]
2025-12-20 14:44:39 +00:00
Constrat
4edcb7dad7 fix: FastPass for EN ref be08678 2025-12-20 15:34:39 +01:00
uye
e6862591e8 fix: 资源更新不应该复制 cache 文件夹 2025-12-20 22:25:26 +08:00
HY
2c3b95ddca chore: 調整繁中服薩米與薩卡茲肉鴿的 OCR 辨識對應文字 (#15145)
* chore: 點人 → 黜人

* chore: 更新部分不期而遇關卡名稱

* chore: 再改一點
2025-12-20 14:58:46 +01:00
Manicsteiner
fd5449d2de chore: YostarJP JieGarden ocr edit 2025-12-20 21:44:15 +08:00
HX3N
2f88a7e2e8 fix: adb addressRegex (#15142) 2025-12-20 15:58:31 +09:00
Hao Guan
1f7dcde3f9 fix(mac): 资源版本显示标题 2025-12-20 09:25:49 +08:00
github-actions[bot]
131b6c4983 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20382466064
[skip changelog]
2025-12-19 21:05:56 +00:00
github-actions[bot]
03d814e211 chore: Auto Update Game Resources - 2025-12-19
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20379032927

[skip changelog]
2025-12-19 18:30:57 +00:00
HX3N
be08678390 fix: YostarKR StrategyChange_mode-FastPass 2025-12-20 02:59:40 +09:00
HX3N
724326b309 i18n: KR tweak EncounterOptions translation
[skip ci]
2025-12-20 00:23:32 +09:00
Constrat
3b50040cde perf: optimize templates size 2025-12-19 16:20:26 +01:00
github-actions[bot]
28f1fbbc6a chore: Auto Update Game Resources - 2025-12-19
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20372992970

[skip changelog]
2025-12-19 14:34:49 +00:00
HX3N
1fd58e846e chore: YostarKR wrap short OcrReplaces with anchors to prevent misrecognition 2025-12-19 23:24:10 +09:00
Manicsteiner
3e9992598a feat: YostarJP Roguelike JieGarden (#15116)
* feat: YostarJP Roguelike JieGarden

* chore: templates and docs

* chore: OCR edits

* chore: templates and ocr

* chore: add templates

* chore: ocr edit

* chore: ocr edit

* chore: ocr edit

* chore: ocr edit

* chore: remove CoppersAnalyzer roi

* chore: Update docs/ja-jp/manual/introduction/integrated-strategy.md

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* chore: ocr edit

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-12-19 15:16:55 +01:00
Constrat
fbb40d4a7e feat: YostarEN Roguelike Jie Garden (#15119)
* feat: tasks for json

* feat: templates

* fix: remove spaces in encounter analyzer

* docs: update difficulty name

* feat: add skip1 template

* i18n: translations

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: typo

* i18n: typo

* feat: missing templates

* fix: missing optimized

* feat: add squads and starts

* fix: add ROI to StrategyChange detection

* chore: remove unnecessary field from sarkaz

* fix: add all basetasks and texts from JP

* fix: update DropsFlag for all IS

* fix: LeaveBosky custom for EN (different color shading)

* fix: custom Abandon for EN (slightly taller no idea)

* fix: just reduce score for abandon

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: added space remove

* feat: add coppers to trader list

* fix: revert regex changes to copper

Waiting to increase ROI

* i18n: AI Sourcery wow

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* chore: cleanup tasks

* fix: Encounter OCR remove dashes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-12-19 15:10:20 +01:00
HX3N
05fc329eb3 feat: YostarKR Roguelike JieGarden (#15113)
* chore: placeholder

* chore: Squad and Roles

* chore: remove CoppersType

* chore: NextLevel and StrategyChange_mode

* chore: StageEncounterOcr and RoguelikeTraderShoppingOcr

* chore: templates

* chore: JieGarden@Roguelike@StartAction

Yostar... :(

* chore: BattleStageName

* chore: text and templates

* chore: CoppersNameOcrReplace and OptionHeaderBar

* chore: remove space

* chore: CharsNameOcrReplace and template

* docs: IS

* chore: template and encounter

* chore: TraderShoppingOcr add Copper

i18n: SpecialForceSquad

chore: revert 강제이동

Update ko-kr.xaml

* fix: StrategyChange_mode

* chore: GamePass
2025-12-19 14:57:23 +01:00
travellerse
415fb7d8fc fix: change tongbao name OCR to fit oversea (#15129)
* fix: 移除通宝已投出硬编码

* fix: 添加左侧列通宝名称识别OCR任务

* fix: 加长通宝名称识别的ROI

* fix: apply suggestion

* chore: increase pickupOCR ROI (from JP)

* fix: increase ExchangeNameOCR ROI to max

---------

Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-12-19 14:32:12 +01:00
Constrat
0f25d34076 ci: implement matrix for uploading myrror + ubuntu for winget (#14844)
* ci: implement matrix for uploading myrror + ubuntu for winget

docs say it's fine since we don't use .msi

* revert: ubuntu-latest to windows-latest
2025-12-19 13:57:10 +01:00
MistEO
07b808dc30 ci: 将 pre-commit 改为定时任务运行 (#15133) 2025-12-19 18:03:49 +08:00
github-actions[bot]
84b54d395a chore: Auto Update Game Resources - 2025-12-19
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20363778361

[skip changelog]
2025-12-19 08:04:58 +00:00
MistEO
c80954862b perf: use boost::regex instead of std::regex (#15126) 2025-12-19 13:04:28 +08:00
status102
6d8bab3588 fix: 更新后连带清除过往未下载成功的OTA包 2025-12-19 10:08:32 +08:00
Weiyou Wang
90ecbb9a74 fix: 修复 MacOS asst.log 自动清空的问题 (#15122) 2025-12-19 10:02:35 +08:00
github-actions[bot]
7143cd2a72 chore: Auto Update Game Resources - 2025-12-18
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20350382139

[skip changelog]
2025-12-18 20:29:24 +00:00
github-actions[bot]
cffc52ae0a chore: Auto Update Game Resources - 2025-12-18
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20342598213

[skip changelog]
2025-12-18 15:48:47 +00:00
Constrat
b62dc10967 fix: PlaatformWin32 for ResourceUpdater on windows 2025-12-18 16:40:34 +01:00
HX3N
0af9ee5e95 chore: enable Roguelike JieGarden for Yostar servers 2025-12-18 16:44:41 +09:00
github-actions[bot]
27c748ad89 chore: Auto Update Game Resources - 2025-12-18
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20329402284

[skip changelog]
2025-12-18 07:29:28 +00:00
mayuri0v0
e91efce7db fix: 去除路径左右的空格与控制字符 (#15082)
* fix: 去除路径左右的空格与控制字符

* fix: 忘了调库了

* fix: 忘了调库了
2025-12-18 13:20:00 +08:00
Constrat
46e2025699 fix: regex for Leizi Alter for EN 2025-12-17 17:12:01 +01:00
铃语
11edd2a030 perf: 更新 333 极限效率一天三换排班表(20251217 修订) (#15108)
* perf: 更新 333 极限效率一天三换排班表(20251217 修订)

* perf: 优化描述

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-17 23:49:21 +08:00
github-actions[bot]
02b1e0e15e feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20283887348
[skip changelog]
2025-12-16 21:52:45 +00:00
Status102
c7d947fc03 perf: TemplResource 查找图片过程预构建索引 (#15092)
* rft: TemplResource 查找图片过程预构建索引

* perf: 存储相对路径

* chore: rename

* fix: case

* fix: 还原成旧的.path
2025-12-16 22:55:56 +08:00
uye
2106057d13 fix: 赠送线索后的弹窗会挡住自己新线索的图标 2025-12-16 17:31:00 +08:00
vonnoq
46c2464bb4 fix: 繁中服 自動編隊不會使用職業欄 (#15090)
* fix:繁中服 黍 識別錯誤

黍被識別為丞

* fix:繁中服 無法透過職業自動編隊

* fix:繁中服 無法透過職業自動編隊

* fix:繁中服 無法透過職業自動編隊

* fix:繁中服 無法透過職業自動編隊

* fix:繁中服 無法透過職業自動編隊

* fix:繁中服 無法透過職業自動編隊

* fix:繁中服 無法透過職業自動編隊

* fix:繁中服 無法透過職業自動編隊
2025-12-16 09:24:01 +08:00
dependabot[bot]
3b3383ef4b ci: bump the github-actions group in /.github/workflows with 4 updates (#15091)
Bumps the github-actions group in /.github/workflows with 4 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/cache](https://github.com/actions/cache), [actions/download-artifact](https://github.com/actions/download-artifact) and [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).


Updates `actions/upload-artifact` from 5 to 6
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

Updates `actions/cache` from 4 to 5
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

Updates `actions/download-artifact` from 6 to 7
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v7)

Updates `peter-evans/create-pull-request` from 7 to 8
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: peter-evans/create-pull-request
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-15 18:44:55 +01:00
github-actions[bot]
0abc18ef10 chore: Auto Update Game Resources - 2025-12-15
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20224773230

[skip changelog]
2025-12-15 08:05:21 +00:00
HX3N
c154e24cf3 fix: YostarKR update Roguelike@TraderRandomShoppingConfirm 2025-12-15 13:30:33 +09:00
Constrat
b956f1690a fix: prettier 2025-12-14 17:24:23 +01:00
HX3N
087dc66617 fix: YostarKR remove problematic equivalence_classes
ref #15084
2025-12-15 00:54:27 +09:00
DavidWang19
087c34a67d perf: 让截图工具支持从src/获取的截图也缩放到目标分辨率 2025-12-14 20:53:23 +08:00
github-actions[bot]
0b30335044 chore: Auto Templates Optimization
Triggered by dd23959f41

[skip changelog]
2025-12-14 12:44:56 +00:00
DavidWang19
dd23959f41 fix: 增加巫恋的绣云鹤皮肤头像 2025-12-14 20:44:27 +08:00
uye
3a7e5780b6 perf: 优化 StableHash 2025-12-14 18:41:36 +08:00
uye
98fbcd1712 chore: 调整正则 2025-12-14 18:23:18 +08:00
uye
f3a1812eff fix: 关卡名中的 - 被识别成
fix #15074
2025-12-14 18:20:01 +08:00
github-actions[bot]
e2d666785a chore: Auto Templates Optimization
Triggered by e0c2338531

[skip changelog]
2025-12-14 09:50:39 +00:00
uye
e0c2338531 fix: 基建使用无人机加速贸易站点击 最多 按钮边缘时可能点到 +
fix #15081
2025-12-14 17:50:15 +08:00
status102
08cfe7c4c2 fix(wpf): 移除过时的基建Mode转换 2025-12-13 17:14:54 +08:00
uye
58d5b5c02b fix: 自动战斗借非好友助战在关卡结束后卡在加好友界面 2025-12-13 03:11:30 +08:00
uye
b5164c333c docs: Update CHANGELOG for version 6.0.1
Added highlights for version 6.0.1, including quick fixes and .NET 10 upgrade details.
2025-12-13 02:44:15 +08:00
uye
487df8ffc4 fix: 逃离哥伦比亚 2025-12-13 00:15:52 +08:00
Constrat
84182aa9c1 Release v6.0.1 (#15052)
## Summary by Sourcery

为 v6.0.1 版本发布做准备,包含更新游戏资源、模拟器配置校验以及模板优化设置等内容。

New Features:
- 为最新活动与集成战略关卡新增明日方舟地块位置数据文件。

Bug Fixes:
- 通过检查必要的 DLL 文件来校验 MuMu 和 LDPlayer 模拟器路径,并在配置无效时显示本地化指引信息。

Enhancements:
- 更新商数夜市与阿卡胡兰丛林关卡的 copilot 与仅任务配置。
- 更新 YoStarEN Reclamation2 和 Tales RA 的任务资源。
- 为新版本优化 OptimizeTemplates 工具配置。
- 为新的模拟器校验消息扩展本地化资源。

Chores:
- 更新战斗与总览元数据,以及 v6.0.1 版本的版本信息。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare v6.0.1 release with updated game resources, emulator
configuration validation, and template optimization settings.

New Features:
- Add new Arknights tile-position data files for recent event and legion
stages.

Bug Fixes:
- Validate MuMu and LDPlayer emulator paths by checking for required
DLLs and show localized guidance when configuration is invalid.

Enhancements:
- Refresh copilot and task-only configurations for Shangshu Night Market
and Acahuallan Jungle stages.
- Update YoStarEN Reclamation2 and Tales RA task resources.
- Refine OptimizeTemplates tool configuration for the new release.
- Extend localization resources for new emulator validation messages.

Chores:
- Update battle and overview metadata along with version information for
the v6.0.1 release.

</details>

改进内容:
- 刷新尚蜀夜市和阿赫瓦兰丛林关卡的 copilot SSS 与纯任务资源定义。
- 调整 Reclamation2 和 Tales 的全球 YoStarEN RA 任务资源。
- 为新版本优化并微调 OptimizeTemplates 工具配置。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

为 v6.0.1 版本发布做准备,包含更新游戏资源、模拟器配置校验以及模板优化设置等内容。

New Features:
- 为最新活动与集成战略关卡新增明日方舟地块位置数据文件。

Bug Fixes:
- 通过检查必要的 DLL 文件来校验 MuMu 和 LDPlayer 模拟器路径,并在配置无效时显示本地化指引信息。

Enhancements:
- 更新商数夜市与阿卡胡兰丛林关卡的 copilot 与仅任务配置。
- 更新 YoStarEN Reclamation2 和 Tales RA 的任务资源。
- 为新版本优化 OptimizeTemplates 工具配置。
- 为新的模拟器校验消息扩展本地化资源。

Chores:
- 更新战斗与总览元数据,以及 v6.0.1 版本的版本信息。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare v6.0.1 release with updated game resources, emulator
configuration validation, and template optimization settings.

New Features:
- Add new Arknights tile-position data files for recent event and legion
stages.

Bug Fixes:
- Validate MuMu and LDPlayer emulator paths by checking for required
DLLs and show localized guidance when configuration is invalid.

Enhancements:
- Refresh copilot and task-only configurations for Shangshu Night Market
and Acahuallan Jungle stages.
- Update YoStarEN Reclamation2 and Tales RA task resources.
- Refine OptimizeTemplates tool configuration for the new release.
- Extend localization resources for new emulator validation messages.

Chores:
- Update battle and overview metadata along with version information for
the v6.0.1 release.

</details>

</details>
- 为 v6.0.1 版本发布调整 OptimizeTemplates 工具配置

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

为 v6.0.1 版本发布做准备,包含更新游戏资源、模拟器配置校验以及模板优化设置等内容。

New Features:
- 为最新活动与集成战略关卡新增明日方舟地块位置数据文件。

Bug Fixes:
- 通过检查必要的 DLL 文件来校验 MuMu 和 LDPlayer 模拟器路径,并在配置无效时显示本地化指引信息。

Enhancements:
- 更新商数夜市与阿卡胡兰丛林关卡的 copilot 与仅任务配置。
- 更新 YoStarEN Reclamation2 和 Tales RA 的任务资源。
- 为新版本优化 OptimizeTemplates 工具配置。
- 为新的模拟器校验消息扩展本地化资源。

Chores:
- 更新战斗与总览元数据,以及 v6.0.1 版本的版本信息。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare v6.0.1 release with updated game resources, emulator
configuration validation, and template optimization settings.

New Features:
- Add new Arknights tile-position data files for recent event and legion
stages.

Bug Fixes:
- Validate MuMu and LDPlayer emulator paths by checking for required
DLLs and show localized guidance when configuration is invalid.

Enhancements:
- Refresh copilot and task-only configurations for Shangshu Night Market
and Acahuallan Jungle stages.
- Update YoStarEN Reclamation2 and Tales RA task resources.
- Refine OptimizeTemplates tool configuration for the new release.
- Extend localization resources for new emulator validation messages.

Chores:
- Update battle and overview metadata along with version information for
the v6.0.1 release.

</details>

改进内容:
- 刷新尚蜀夜市和阿赫瓦兰丛林关卡的 copilot SSS 与纯任务资源定义。
- 调整 Reclamation2 和 Tales 的全球 YoStarEN RA 任务资源。
- 为新版本优化并微调 OptimizeTemplates 工具配置。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

为 v6.0.1 版本发布做准备,包含更新游戏资源、模拟器配置校验以及模板优化设置等内容。

New Features:
- 为最新活动与集成战略关卡新增明日方舟地块位置数据文件。

Bug Fixes:
- 通过检查必要的 DLL 文件来校验 MuMu 和 LDPlayer 模拟器路径,并在配置无效时显示本地化指引信息。

Enhancements:
- 更新商数夜市与阿卡胡兰丛林关卡的 copilot 与仅任务配置。
- 更新 YoStarEN Reclamation2 和 Tales RA 的任务资源。
- 为新版本优化 OptimizeTemplates 工具配置。
- 为新的模拟器校验消息扩展本地化资源。

Chores:
- 更新战斗与总览元数据,以及 v6.0.1 版本的版本信息。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare v6.0.1 release with updated game resources, emulator
configuration validation, and template optimization settings.

New Features:
- Add new Arknights tile-position data files for recent event and legion
stages.

Bug Fixes:
- Validate MuMu and LDPlayer emulator paths by checking for required
DLLs and show localized guidance when configuration is invalid.

Enhancements:
- Refresh copilot and task-only configurations for Shangshu Night Market
and Acahuallan Jungle stages.
- Update YoStarEN Reclamation2 and Tales RA task resources.
- Refine OptimizeTemplates tool configuration for the new release.
- Extend localization resources for new emulator validation messages.

Chores:
- Update battle and overview metadata along with version information for
the v6.0.1 release.

</details>

</details>

</details>
2025-12-12 15:53:19 +01:00
github-actions[bot]
dc68f34960 docs: Auto Update Changelogs of v6.0.1 (#15067)
* docs: Auto Generate Changelog of Release v6.0.1

* fix: cleanup md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-12-12 15:31:51 +01:00
HX3N
d39074c831 i18n: KR tweak punctuation 2025-12-12 23:26:22 +09:00
Manicsteiner
5e54cabc80 chore: YostarJP roguelike ocr edit 2025-12-12 22:18:49 +08:00
Constrat
d59e70d08a fix: wrong template 2025-12-12 14:50:09 +01:00
Constrat
8020cafac4 fix: collect rewards for EN updated templates 2025-12-12 14:17:59 +01:00
uye
7fd6ffae14 feat: 为 MuMu/LDPlayer 添加路径/库检查并补充 i18n 提示 2025-12-12 18:06:08 +08:00
github-actions[bot]
9a8df0ea4e chore: Auto Update Game Resources - 2025-12-12
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20162370738

[skip changelog]
2025-12-12 09:30:07 +00:00
Constrat
199ab432f0 fix: OCR for RA2 2025-12-11 22:43:22 +01:00
Constrat
c897693363 chore: update translations for SSS#8 tasks 2025-12-11 22:43:14 +01:00
Constrat
ea623bbb16 chore: tweak copilot SSS tasks name 2025-12-11 22:12:07 +01:00
Constrat
08d7105a94 fix: Update StageTrader for EN IS 2025-12-11 22:02:14 +01:00
uye
5b8a260deb Release v6.0.0 (#15040)
## Summary by Sourcery

更新支持列表处理逻辑以使用回调方式,并让 ROI 自适应窗口大小,同时为新版本刷新 VSCode 扩展文档和打包资源元数据。

New Features:
- 文档中新增 VSCode 扩展的功能说明,例如快速跳转到任务定义、ROI 复制、识别工具以及跨多种语言查看日志等能力。

Enhancements:
- 重构 SupportList,使其由回调函数、assistant 实例和任务链构造,而不是依赖 AbstractTask 父类。
- 调整支持列表分析的 ROI 宽度,以更好适配不同的窗口宽度。

Documentation:
- 扩展多语言 VSCode 扩展教程,增加功能概览、使用技巧、OCR 故障排查、日志查看说明,以及对 MaaFramework
版本选择行为的更清晰解释。

Chores:
- 为新版本刷新打包的战斗/资源元数据、区域任务数据以及模板优化配置。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Update support list handling to use callbacks and adapt ROI to window
size, while refreshing VSCode extension documentation and bundled
resource metadata for the new release.

New Features:
- Document new VSCode extension capabilities such as quick task
definition jump, ROI copy, recognition tools, and log viewing across
multiple languages.

Enhancements:
- Refactor SupportList to be constructed from callback, assistant
instance, and task chain instead of an AbstractTask parent.
- Adjust support list analysis ROI width to better accommodate varying
window widths.

Documentation:
- Expand multi-language VSCode extension tutorials with feature
overview, usage tips, OCR troubleshooting, logging instructions, and
clarified MaaFramework version selection behavior.

Chores:
- Refresh packaged battle/resource metadata, regional task data, and
template optimization settings for the new version.

</details>

增强功能:
- 通过在等待详情面板出现时允许更多重试,提高支持单元选择的健壮性。
- 调整支持列表分析的 ROI 宽度计算,以更好地适应不同的窗口大小。

文档:
- 扩展多语言 VSCode 插件教程,加入功能概览、使用技巧、日志查看说明,以及关于 MaaFramework 版本选择的最新行为说明。

日常维护:
- 为新版本刷新打包的资源元数据和任务数据,包括特定地区的资源和优化模板。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

更新支持列表处理逻辑以使用回调方式,并让 ROI 自适应窗口大小,同时为新版本刷新 VSCode 扩展文档和打包资源元数据。

New Features:
- 文档中新增 VSCode 扩展的功能说明,例如快速跳转到任务定义、ROI 复制、识别工具以及跨多种语言查看日志等能力。

Enhancements:
- 重构 SupportList,使其由回调函数、assistant 实例和任务链构造,而不是依赖 AbstractTask 父类。
- 调整支持列表分析的 ROI 宽度,以更好适配不同的窗口宽度。

Documentation:
- 扩展多语言 VSCode 扩展教程,增加功能概览、使用技巧、OCR 故障排查、日志查看说明,以及对 MaaFramework
版本选择行为的更清晰解释。

Chores:
- 为新版本刷新打包的战斗/资源元数据、区域任务数据以及模板优化配置。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Update support list handling to use callbacks and adapt ROI to window
size, while refreshing VSCode extension documentation and bundled
resource metadata for the new release.

New Features:
- Document new VSCode extension capabilities such as quick task
definition jump, ROI copy, recognition tools, and log viewing across
multiple languages.

Enhancements:
- Refactor SupportList to be constructed from callback, assistant
instance, and task chain instead of an AbstractTask parent.
- Adjust support list analysis ROI width to better accommodate varying
window widths.

Documentation:
- Expand multi-language VSCode extension tutorials with feature
overview, usage tips, OCR troubleshooting, logging instructions, and
clarified MaaFramework version selection behavior.

Chores:
- Refresh packaged battle/resource metadata, regional task data, and
template optimization settings for the new version.

</details>

</details>
2025-12-12 02:36:20 +08:00
uye
79a658c8db docs: changelog 2025-12-12 02:34:06 +08:00
github-actions[bot]
3d796dec56 docs: Auto Update Changelogs of v6.0.0 (#15048)
* docs: Auto Generate Changelog of Release v6.0.0

* docs: ai 改 changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2025-12-12 02:32:50 +08:00
uye
8a824c23af docs: Update docs/en-us/develop/vsc-ext-tutorial.md
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-12-12 01:16:29 +08:00
status102
37d4185cbe fix: 移除废弃的右键添加作业集行为 2025-12-12 01:03:10 +08:00
Manicsteiner
8921ccf093 fix: YostarJP Roguelike StagrTrader (#15047) 2025-12-12 00:22:55 +08:00
status102
165ad9ecb0 fix: 自动编队助战模块retry_times 2025-12-11 22:25:58 +08:00
status102
1d3c2fd049 Revert "fix: 助战干员进入详情页后flag检测retry"
This reverts commit 04615fb22c.
2025-12-11 22:22:45 +08:00
status102
04615fb22c fix: 助战干员进入详情页后flag检测retry 2025-12-11 20:49:29 +08:00
github-actions[bot]
c7dbd48709 chore: Auto Templates Optimization
Triggered by b2929100ba

[skip changelog]
2025-12-11 12:44:40 +00:00
HX3N
b2929100ba fix: YostarKR Roguelike@StageTrader UI updates
ref #13172
2025-12-11 21:43:23 +09:00
github-actions[bot]
e5653427e0 chore: Auto Update Game Resources - 2025-12-11
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20132471286

[skip changelog]
2025-12-11 12:05:46 +00:00
github-actions[bot]
2adc3699c6 chore: Auto Update Game Resources - 2025-12-11
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20131954062

[skip changelog]
2025-12-11 11:44:32 +00:00
HX3N
0563565f80 chore: YostarKR ocr edits for FM
RecruitTags ocr fix may be reverted when Yostar rolls back their tags
2025-12-11 20:35:08 +09:00
Natsuu
51ee0fea1c docs: add instruction of log view in vsc-ext (#14696)
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-11 18:37:54 +08:00
Manicsteiner
5ff48c456c chore: YostarJP ocr (#15026)
* chore: YostarJP ocr

* fix: jp纯艾ocrfix

* fix: jp惊蛰ocrfix

---------

Co-authored-by: 萨拉托加 <151550168+Saratoga-Official@users.noreply.github.com>
2025-12-11 18:19:57 +08:00
uye
9fd19c908d Release v6.0.0-beta.2 (#15021)
## Sourcery 总结

改进平台相关的栈基址检测逻辑,调整 UI 日志与关卡显示行为,更新 v6 的安全支持策略,并为新的测试版刷新游戏/资源数据。

Bug 修复:
- 通过处理 `GetModuleHandleExA` 调用失败的情况,改进 Windows 模块基址获取。
- 使用 `dladdr` 并在失败时以更安全的方式扫描 `/proc/self/maps` 作为回退方案,使 Linux 基址解析更加健壮。
- 始终使用关卡提供的显示字段和数值字段,防止对不支持的关卡进行错误标记。
- 在下载日志更新中通过传递字符串并在同一处构建 WPF 提示框(tooltip),修复提示信息的处理问题。
- 改进在助战角色选择以及助战列表更新中的错误日志记录,使诊断信息更加清晰。

功能增强:
- 在助战角色选择中允许更多重试次数后再判定失败,以提高健壮性。
- 通过改用基于字符串的提示信息而不是 UI 元素类型,简化任务队列下载日志的 API。

文档:
- 更新 SECURITY.md,说明只有最新的 v6 稳定版本会获得安全支持。

日常维护:
- 为多个地区刷新战斗、物品、召集、任务以及版本资源文件,以支持 v6.0.0-beta.2 版本发布。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Refine platform-specific stack base address detection, adjust UI logging
and stage display behavior, update security support policy for v6, and
refresh game/resource data for the new beta release.

Bug Fixes:
- Improve Windows module base retrieval by handling GetModuleHandleExA
failures.
- Make Linux base address resolution more robust using dladdr with a
safer fallback that scans /proc/self/maps.
- Prevent incorrect stage labeling for unsupported stages by always
using stage-provided display and value fields.
- Fix tooltip handling in download log updates by passing strings and
constructing WPF tooltips in one place.
- Improve error logging in support-role selection and support list
updates for clearer diagnostics.

Enhancements:
- Increase robustness of support-role selection by allowing more retries
before failing.
- Simplify task queue download log API by using string-based tooltips
instead of UI element types.

Documentation:
- Update SECURITY.md to state that only the latest v6 stable release
receives security support.

Chores:
- Refresh battle, item, recruitment, task, and version resource files
for multiple regions for the v6.0.0-beta.2 release.

</details>
2025-12-11 16:28:58 +08:00
github-actions[bot]
7ebedec7b8 docs: Auto Update Changelogs of v6.0.0-beta.2 (#15022)
* docs: Auto Generate Changelog of Release v6.0.0-beta.2

* docs: Refactor v6.0.0-beta.2 changelog following patch version conventions (#15024)

* Initial plan

* docs: Refactor v6.0.0-beta.2 changelog following project conventions

- Add Highlights section with bilingual content
- Merge beta.1 and beta.2 sections following patch version format
- Include beta.2-specific fixes in Highlights
- Add detailed changelog sections for both versions
- Follow historical format from previous beta releases

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* Remove fixes section from CHANGELOG.md

Removed fix section for version 6.0.0-beta.2 and above from CHANGELOG.md.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Update .NET version in documentation to 10

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-12-11 16:28:45 +08:00
wryx166
7b4aed0abe docs: 更新文档中的 .NET 版本至 10 (#15023) 2025-12-11 16:17:09 +08:00
pre-commit-ci[bot]
b6c34b8363 chore: Auto update by pre-commit hooks [skip changelog] 2025-12-11 08:13:18 +00:00
uye
7d7221cd74 fix: 资源更新创建 ToolTip 失败
fix #15012
2025-12-11 16:04:31 +08:00
SherkeyXD
4f5afa8bef docs: 更新安全策略版本 2025-12-11 12:22:22 +08:00
github-actions[bot]
d8b728eebe chore: Auto Update Game Resources - 2025-12-11
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20120701727

[skip changelog]
2025-12-11 03:14:14 +00:00
status102
035e2632a5 fix: 自动编队助战切换职业retry 2025-12-11 10:42:05 +08:00
github-actions[bot]
0845c19dd6 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/20114426102
[skip changelog]
2025-12-10 21:53:00 +00:00
uye
460eb6c6d6 fix: 多活动同时开放时提示可能被错误折叠 2025-12-11 02:47:11 +08:00
Status102
1bb3132896 perf: Stacktrace Linux 优化 (#14983)
* fix: 修修Linux

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-11 01:17:03 +08:00
uye
a233635d80 Release v6.0.0-beta.1 (#15001)
## 由 Sourcery 生成的摘要

更新关卡活动处理逻辑以消费新的 StageActivityV2 格式,将丰富的小游戏元数据暴露给工具箱 UI,并在助战选择、线索发送、GPU
检测、原生互操作以及 DLL 劫持防护方面增强可靠性和安全性。

新功能:
- 从新的 `StageActivityV2.json` 格式中解析丰富的小游戏条目,并将其绑定到 WPF 工具箱,以实现小游戏的动态配置。

缺陷修复:
- 修正快速编队助战干员完成逻辑,用于跟踪已填充的干员分组,避免将未勾选的干员误标记为缺失。
- 提高基础设施线索发送时的重试次数,以提升可靠性。
- 确保变更日志窗口在已打开时被激活,而不是新建一个窗口。
- 修复 Windows 配置管理器 GPU 查询逻辑,使其正确使用 span 和缓冲池,避免缓冲区误用和泄漏。
- 扩展启动 DLL 白名单,以降低 WPF GUI 中的 DLL 劫持风险。

增强改进:
- 调整活动关卡解析,以支持分组的支线故事,以及为关卡和小游戏提供活动时间元数据。
- 重构助战列表处理,改为使用以 `InstHelper` 为基础的辅助类,提供更清晰的日志记录,并将实际选中的助战干员名称返回给编队逻辑。
- 改进战斗编队中对缺失干员和注入助战单位的处理,通过跟踪是哪个分组被填充,避免对未选择的干员错误标记为缺失。
- 现代化 MaaService 中 MaaCore 的原生互操作绑定,改用源生成的 `LibraryImport` 和显式封送属性。
- 为 `LocalizationHelper` 添加查找辅助方法,以安全检查键是否存在,并在获取字符串失败时不抛出异常。
- 以更安全的顺序初始化依赖的单例对象,确保 `StageManager` 在依赖它的视图模型之前可用。
- 将助战列表内容仅记录到日志中,而不再通过额外的回调负载对外发送。
- 在夜间 OTA 工作流的 WPF 发布步骤中加入与架构相关的平台选择。
- 将小游戏列表刷新与本地日期/关卡更新联动,使 UI 能反映当前的活动配置。

构建:
- 提升用于 macOS 签名与配置以及 GitHub Releases 的 GitHub Actions 版本,并更新 CMake
生成器/工具脚本和文档,以引用更新后的 Visual Studio 工具集。

持续集成(CI):
- 更新 CI 发布流程,在夜间 OTA 工作流中为 WPF GUI 构建传递平台相关的配置。

文档:
- 刷新多语言开发文档,以引用更新后的 Visual Studio 版本和新的 CMake 生成器参数。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Update stage activity handling to consume the new StageActivityV2
format, expose rich mini-game metadata to the toolbox UI, and tighten
reliability and security around support selection, clue sending, GPU
detection, native interop, and DLL hijack prevention.

New Features:
- Parse rich mini-game entries from the new StageActivityV2.json format
and bind them to the WPF toolbox for dynamic mini-game configuration.

Bug Fixes:
- Correct quick formation support-operator completion logic to track
filled operator groups and avoid mislabeling unchecked operators as
missing.
- Increase retry count when sending infrastructure clues to improve
reliability.
- Ensure the changelog window is activated when already open instead of
creating a new window.
- Fix Windows configuration manager GPU queries to use spans and pooled
buffers correctly, avoiding buffer misuse and leaks.
- Extend startup DLL whitelist to reduce DLL hijack risk in the WPF GUI.

Enhancements:
- Adjust activity-stage parsing to support grouped side stories and
activity time metadata for stages and mini-games.
- Refactor support list handling to use an InstHelper-backed helper with
clearer logging and to return actual chosen support operator names to
formation logic.
- Improve battle formation handling of missing operators and injected
support units by tracking which group was filled and avoiding incorrect
missing flags for unselected operators.
- Modernize MaaCore native interop bindings in MaaService to use
source-generated LibraryImport and explicit marshalling attributes.
- Add lookup helpers to LocalizationHelper for safe key existence checks
and non-throwing string retrieval.
- Initialize dependent singletons in a safer order so StageManager is
available before view models that depend on it.
- Log support list contents only to the logger instead of emitting extra
callback payloads.
- Include architecture-specific platform selection in WPF publish steps
of the nightly OTA workflow.
- Wire mini-game list refresh into local date/stage updates so UI
reflects current activity configuration.

Build:
- Bump GitHub Actions versions for macOS signing and provisioning and
for GitHub Releases, and update CMake generator/tooling scripts and docs
to reference the newer Visual Studio toolset.

CI:
- Update CI publishing to pass platform-specific configuration for WPF
GUI builds in nightly OTA workflow.

Documentation:
- Refresh multi-language development docs to reference the newer Visual
Studio version and updated CMake generator arguments.

</details>

新功能:
- 暴露从新的 `StageActivityV2.json` 格式中解析出的丰富小游戏条目,并将其绑定到 WPF
工具箱中,以支持动态配置小游戏。

漏洞修复:
- 修复快速编队补充助战干员时的逻辑,确保正确追踪已填充的干员分组,并防止未勾选的干员被错误标记为“缺失”。
- 通过增加重试次数,提高基建线索接收与发送的可靠性。
- 当变更日志窗口已打开时,确保正确激活该窗口,而不是新开一个窗口。
- 在通过 Windows 配置管理器 API 查询 GPU 相关设备属性时,避免缓冲区误用和内存泄漏。
- 通过扩展启动时检查的 DLL 列表,防止 DLL 劫持问题。

<details>
<summary>Original summary in English</summary>

## 由 Sourcery 生成的摘要

更新关卡活动处理逻辑以消费新的 StageActivityV2 格式,将丰富的小游戏元数据暴露给工具箱 UI,并在助战选择、线索发送、GPU
检测、原生互操作以及 DLL 劫持防护方面增强可靠性和安全性。

新功能:
- 从新的 `StageActivityV2.json` 格式中解析丰富的小游戏条目,并将其绑定到 WPF 工具箱,以实现小游戏的动态配置。

缺陷修复:
- 修正快速编队助战干员完成逻辑,用于跟踪已填充的干员分组,避免将未勾选的干员误标记为缺失。
- 提高基础设施线索发送时的重试次数,以提升可靠性。
- 确保变更日志窗口在已打开时被激活,而不是新建一个窗口。
- 修复 Windows 配置管理器 GPU 查询逻辑,使其正确使用 span 和缓冲池,避免缓冲区误用和泄漏。
- 扩展启动 DLL 白名单,以降低 WPF GUI 中的 DLL 劫持风险。

增强改进:
- 调整活动关卡解析,以支持分组的支线故事,以及为关卡和小游戏提供活动时间元数据。
- 重构助战列表处理,改为使用以 `InstHelper` 为基础的辅助类,提供更清晰的日志记录,并将实际选中的助战干员名称返回给编队逻辑。
- 改进战斗编队中对缺失干员和注入助战单位的处理,通过跟踪是哪个分组被填充,避免对未选择的干员错误标记为缺失。
- 现代化 MaaService 中 MaaCore 的原生互操作绑定,改用源生成的 `LibraryImport` 和显式封送属性。
- 为 `LocalizationHelper` 添加查找辅助方法,以安全检查键是否存在,并在获取字符串失败时不抛出异常。
- 以更安全的顺序初始化依赖的单例对象,确保 `StageManager` 在依赖它的视图模型之前可用。
- 将助战列表内容仅记录到日志中,而不再通过额外的回调负载对外发送。
- 在夜间 OTA 工作流的 WPF 发布步骤中加入与架构相关的平台选择。
- 将小游戏列表刷新与本地日期/关卡更新联动,使 UI 能反映当前的活动配置。

构建:
- 提升用于 macOS 签名与配置以及 GitHub Releases 的 GitHub Actions 版本,并更新 CMake
生成器/工具脚本和文档,以引用更新后的 Visual Studio 工具集。

持续集成(CI):
- 更新 CI 发布流程,在夜间 OTA 工作流中为 WPF GUI 构建传递平台相关的配置。

文档:
- 刷新多语言开发文档,以引用更新后的 Visual Studio 版本和新的 CMake 生成器参数。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Update stage activity handling to consume the new StageActivityV2
format, expose rich mini-game metadata to the toolbox UI, and tighten
reliability and security around support selection, clue sending, GPU
detection, native interop, and DLL hijack prevention.

New Features:
- Parse rich mini-game entries from the new StageActivityV2.json format
and bind them to the WPF toolbox for dynamic mini-game configuration.

Bug Fixes:
- Correct quick formation support-operator completion logic to track
filled operator groups and avoid mislabeling unchecked operators as
missing.
- Increase retry count when sending infrastructure clues to improve
reliability.
- Ensure the changelog window is activated when already open instead of
creating a new window.
- Fix Windows configuration manager GPU queries to use spans and pooled
buffers correctly, avoiding buffer misuse and leaks.
- Extend startup DLL whitelist to reduce DLL hijack risk in the WPF GUI.

Enhancements:
- Adjust activity-stage parsing to support grouped side stories and
activity time metadata for stages and mini-games.
- Refactor support list handling to use an InstHelper-backed helper with
clearer logging and to return actual chosen support operator names to
formation logic.
- Improve battle formation handling of missing operators and injected
support units by tracking which group was filled and avoiding incorrect
missing flags for unselected operators.
- Modernize MaaCore native interop bindings in MaaService to use
source-generated LibraryImport and explicit marshalling attributes.
- Add lookup helpers to LocalizationHelper for safe key existence checks
and non-throwing string retrieval.
- Initialize dependent singletons in a safer order so StageManager is
available before view models that depend on it.
- Log support list contents only to the logger instead of emitting extra
callback payloads.
- Include architecture-specific platform selection in WPF publish steps
of the nightly OTA workflow.
- Wire mini-game list refresh into local date/stage updates so UI
reflects current activity configuration.

Build:
- Bump GitHub Actions versions for macOS signing and provisioning and
for GitHub Releases, and update CMake generator/tooling scripts and docs
to reference the newer Visual Studio toolset.

CI:
- Update CI publishing to pass platform-specific configuration for WPF
GUI builds in nightly OTA workflow.

Documentation:
- Refresh multi-language development docs to reference the newer Visual
Studio version and updated CMake generator arguments.

</details>

</details>
2025-12-11 00:48:25 +08:00
Copilot
bb4af376d3 docs: Generate v6.0.0-beta.1 changelog following project conventions (#15003)
* Initial plan

* docs: 生成 v6.0.0-beta.1 changelog

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* Remove auto-formation optimization details from CHANGELOG

Removed sections related to auto-formation support unit optimization from the changelog.

* docs: 补充单文件发布取消与更新包体积减少说明

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Update CHANGELOG for .NET 10 upgrade details

Removed mention of disabling single-file publishing in .NET 10 upgrade notes.

* docs: 更正 changelog 中的提交作者

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Update CHANGELOG with recent improvements and fixes

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-12-11 00:24:41 +08:00
Status102
e835681bf7 fix: 自动编队助战干员组名存储错误 2025-12-10 23:08:43 +08:00
uye
2599e8d6be rft: 重构简化关卡导航 api,小游戏列表通过 api 获取 (#14997)
* rft: 重构关卡导航 api,小游戏列表通过 api 获取

* feat: 添加小活动开放时间

* style: 初始化
2025-12-10 22:50:16 +08:00
uye
a1ff0cbee5 fix: 在已开启更新日志的情况下点击更新日志窗口不会移至前台 2025-12-10 22:29:40 +08:00
pre-commit-ci[bot]
4deb53bb22 chore: Auto update by pre-commit hooks [skip changelog] 2025-12-10 18:48:16 +08:00
uye
7eab0a76aa feat: LocalizationHelper 支持 TryGetString 与 HasTranslation 2025-12-10 17:21:16 +08:00
status102
6893755bd4 fix: import 2025-12-10 16:29:49 +08:00
status102
a262337abd rft: 自动编队助战页面继承优化 2025-12-10 15:00:29 +08:00
status102
7d4c42822f perf: 自动编队编入助战后缺失干员查找 2025-12-10 12:06:42 +08:00
Manicsteiner
e44e113190 fix: fix nightly ota dotnet build (#14996) 2025-12-10 11:39:11 +08:00
status102
a448cf0af8 fix: 自动编队编入助战后未添加至干员-干员组映射 2025-12-10 11:36:22 +08:00
status102
0ce038a616 perf: 自动编队缺失干员查找优化 2025-12-10 11:36:22 +08:00
status102
f9f08a69a6 fix: 自动编队当干员存在于多个作业组且已经被编入后可能被误标记为未持有 2025-12-10 11:36:21 +08:00
status102
3218989811 chore: 移除不再使用的report 2025-12-10 11:36:16 +08:00
HX3N
f775c6cfeb chore: YostarKR CharsNameOcrReplace ocr edit 2025-12-10 12:33:04 +09:00
uye
41572b1834 fix: 因延迟进入线索传递界面导致任务出错
fix #14992
2025-12-10 02:32:09 +08:00
uye
18c0fd6be7 Revert "chore: 隐藏 .deps.json 与 .runtimeconfig*.json"
This reverts commit 0e6104e790.
2025-12-10 02:05:19 +08:00
dependabot[bot]
8ac592d217 ci: bump the github-actions group in /.github/workflows with 3 updates (#14978)
Bumps the github-actions group in /.github/workflows with 3 updates: [apple-actions/import-codesign-certs](https://github.com/apple-actions/import-codesign-certs), [apple-actions/download-provisioning-profiles](https://github.com/apple-actions/download-provisioning-profiles) and [softprops/action-gh-release](https://github.com/softprops/action-gh-release).


Updates `apple-actions/import-codesign-certs` from 5 to 6
- [Release notes](https://github.com/apple-actions/import-codesign-certs/releases)
- [Commits](https://github.com/apple-actions/import-codesign-certs/compare/v5...v6)

Updates `apple-actions/download-provisioning-profiles` from 4 to 5
- [Release notes](https://github.com/apple-actions/download-provisioning-profiles/releases)
- [Commits](https://github.com/apple-actions/download-provisioning-profiles/compare/v4...v5)

Updates `softprops/action-gh-release` from 2.4.2 to 2.5.0
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.4.2...v2.5.0)

---
updated-dependencies:
- dependency-name: apple-actions/import-codesign-certs
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: apple-actions/download-provisioning-profiles
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: softprops/action-gh-release
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 19:01:30 +01:00
SherkeyXD
97dfaf6dcd build: Update to .NET 10 (#14971)
* build: Update to .NET 10

* chore: 关闭 CET 保证 win10 可用性

* feat: 提升语言版本

* chore: 更新文档与脚本

* chore: update all packages

* fix: 修复 GpuOption 构建错误

* chore: 更新依赖安装脚本

* chore: 更新 csproj 中标记的软件版本

* docs: Update docs/zh-cn/develop/development.md

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* docs: Update docs/zh-tw/develop/development.md

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-12-10 02:00:41 +08:00
uye
0e6104e790 chore: 隐藏 .deps.json 与 .runtimeconfig*.json 2025-12-10 01:50:34 +08:00
uye
1acaab0b75 feat: 第三方依赖移至子文件夹 (#14984)
* feat: 第三方依赖移至子文件夹

* feat: 忽略 libloader.dll
2025-12-10 01:44:41 +08:00
status102
4eff8d066a perf(wpf): 使用LibraryImport替换部分DllImport 2025-12-09 22:01:01 +08:00
uye
300c5d06f9 Release v5.28.5 (#14985)
## Summary by Sourcery

发布维护更新,包含基础设施线索处理改进、新的外部通知支持、日志优化,以及若干 UI/UX 调整。

新特性:
- 新增钉钉作为可配置的外部通知提供方,并支持访问令牌(access token)和密钥(secret)设置。
- 在任务队列 UI 中引入专门的下载日志展示,并通过新的更新方法对外提供。

缺陷修复:
- 确保在不需要更新的情况下清除下载进度时,能够正确关闭“正在下载”状态。

增强改进:
- 优化日志行为,可通过 `DEBUG.txt` 文件切换调试日志开关,并调整异常日志的元数据。
- 改进接待室线索处理逻辑,以支持新增的“快速插入”和“快速发送重复线索”按钮,并相应更新核心逻辑和多语言文档。
- 简化并集中下载进度日志记录,通过 `TaskQueueViewModel` 统一处理,而不是直接操作日志集合。
- 明确战斗编队逻辑中的支援单位使用说明注释,并在编队未发生变化时抑制多余的编队设置操作。
- 在显示警告对话框时记录检测到的非法注入模块。

文档:
- 更新所有受支持语言的基础设施管理文档,说明新的接待室线索发送行为及相关术语变更。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Release maintenance update with infrastructure clue handling
improvements, new external notification support, logging tweaks, and
UI/UX adjustments.

New Features:
- Add DingTalk as a configurable external notification provider with
access token and secret settings.
- Introduce dedicated download log display in the task queue UI and
expose it via a new update method.

Bug Fixes:
- Ensure download progress clearing correctly disables downloading state
when no update is needed.

Enhancements:
- Refine logging behavior to allow debug logging to be toggled via a
DEBUG.txt file and adjust exception logging metadata.
- Improve reception room clue handling to support newly added quick
insert and quick send duplicate clue buttons, updating core logic and
multi-language documentation accordingly.
- Simplify and centralize download progress logging by routing it
through TaskQueueViewModel instead of manipulating log collections
directly.
- Clarify support unit usage comments in battle formation logic and
suppress redundant formation setup when unchanged.
- Log detected bad injected modules when displaying the warning dialog.

Documentation:
- Update infrastructure management documentation in all supported
languages to describe new reception room clue sending behavior and
terminology changes.

</details>
2025-12-09 17:07:25 +08:00
Copilot
0aecc50549 docs: Add v5.28.5 changelog entries following historical format (#14986)
* Initial plan

* docs: Add v5.28.5 changelog entries

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Update CHANGELOG.md by removing outdated sections

Removed sections related to new features, debugging, and logging enhancements from the changelog.

* docs: Update version from v5.28.4 to v5.28.5

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-12-09 17:06:13 +08:00
HX3N
09bf45b307 chore: YostarKR CharsNameOcrReplace remove space 2025-12-09 17:38:19 +09:00
Status102
02bfd3c8c7 feat: LogDebug 宏支持 DEBUG.txt 特性 (#14977)
* feat: LogDebug 宏支持 DEBUG.txt 特性

* fix: log level

* perf: static

* fix: static
2025-12-09 15:55:45 +08:00
uye
07844d61d9 Revert "chore: 重复访问好友添加Ocr兜底"
This reverts commit d59144c549.
2025-12-08 19:54:49 +08:00
github-actions[bot]
0effeb9b00 chore: Auto Templates Optimization
Triggered by a5dfc573dd

[skip changelog]
2025-12-08 11:49:59 +00:00
uye
a5dfc573dd feat: 支持会客室快捷置入线索与一键赠送重复线索 (#14966)
* feat: 支持会客室快捷置入线索与一键赠送重复线索

* docs: 更新文档

* chore: Auto update by pre-commit hooks [skip changelog]

* i18n: JP

* chore: Auto update by pre-commit hooks [skip changelog]

* i18n: sourcery ai suggestion

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* i18n: KR

* chore: 增加被注入的日志记录

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Manicsteiner <Manicsteiner@outlook.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
2025-12-08 19:48:57 +08:00
status102
b6e236eda0 docs: 自动战斗编队注释 2025-12-08 17:03:19 +08:00
uye
fb592fdab5 feat: 更新设置中新增下载进度提示 2025-12-08 17:02:41 +08:00
uye
4cc0bc55d2 perf: 优化绑定 2025-12-08 17:02:22 +08:00
uye
6c4c92f26b fix: 未勾选自动下载时仍提示使用 xx 下载 2025-12-08 17:01:36 +08:00
uye
f198f93ac2 feat: 将下载日志独立出来 2025-12-08 16:16:49 +08:00
uye
82fd1c074e perf: 优化线索识别范围 2025-12-06 17:37:58 +08:00
uye
04ac48c9db fix: 主线/故事集/SideStory 禁用循环次数 2025-12-06 14:19:16 +08:00
Kagura
2947f9fe97 feat: 通知渠道支持钉钉 (#14884)
* feat: 通知渠道支持钉钉

* fix: 还原错误的更改

* chore: 加回丢掉的换行符

* fix: 还原错误删除的内容
2025-12-06 00:45:11 +08:00
uye
8796112363 Release v5.28.4 (#14958)
## Summary by Sourcery

通过更新游戏内容数据,并打磨小游戏、肉鸽玩法、工具链和 CI 行为,为各端与各平台准备 v5.28.4 版本。

New Features:
- 基于所选游戏客户端类型,动态加载小游戏任务选项。
- 为最新活动和 UR 关卡新增关卡、任务与地块位置数据。

Bug Fixes:
- 当小游戏选择为空或未知时,显示专用提示,而不是静默失败。
- 将未知的“两位字母-数字”形式的关卡视作已过期活动关卡,而不是常驻关卡。
- 在包括 txwy 在内的所有客户端上允许幻影肉鸽难度 15。
- 通过放宽匹配模式,改进 MacGui 问题自动打标签的 issue 检查器配置。
- 避免在 lldb 中包装冒烟测试,从而使脚本能在没有调试器的环境中运行。

Enhancements:
- 扩展小游戏提示,覆盖更多小游戏变体,例如 HoneyFruit 对决频道。
- 调整资源、CLI 二进制文件与模板的优化设置,以匹配新版本内容。

Build:
- 调整冒烟测试工作流的权限,只请求对仓库内容的只读访问。

CI:
- 简化 CI 中调用冒烟测试脚本的方式,改为直接运行测试二进制文件,而不附加调试器。

Tests:
- 更新冒烟测试工具和日志,以便在新版本内容下运行面向各客户端的自动化检查。

Chores:
- 刷新多类游戏数据资源文件(战斗、基建、物品、关卡、任务以及本地化)以适配新版本。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare v5.28.4 by updating game content data and polishing minigame,
roguelike, tooling, and CI behavior across clients and platforms.

New Features:
- Load minigame task options dynamically based on the selected game
client type.
- Add new stage, task, and tile-position data for the latest activities
and UR stages.

Bug Fixes:
- Handle unknown or empty minigame selections by showing a dedicated tip
instead of failing silently.
- Treat unknown two-letter dash numeric stages as expired activity
stages instead of permanent ones.
- Allow Phantom roguelike difficulty 15 on all clients, including txwy.
- Improve MacGui issue auto-labeling by broadening the matching patterns
in the issue checker configuration.
- Avoid wrapping smoke tests in lldb so the script can run in
environments without the debugger.

Enhancements:
- Extend minigame tips to cover additional minigame variants such as
HoneyFruit duel channel.
- Refine resources, CLI binary, and template optimization settings to
align with the new release content.

Build:
- Adjust smoke testing workflow permissions to only request read access
to repository contents.

CI:
- Simplify the smoke testing script invocation in CI to run the test
binary directly without debugger attachment.

Tests:
- Update smoke testing tooling and logs for running client-specific
automated checks with the new release content.

Chores:
- Refresh multiple game data resource files (battle, infrastructure,
items, stages, tasks, and localization) for the new release.

</details>

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

通过更新游戏内容数据,并打磨小游戏、肉鸽玩法、工具链和 CI 行为,为各端与各平台准备 v5.28.4 版本。

New Features:
- 基于所选游戏客户端类型,动态加载小游戏任务选项。
- 为最新活动和 UR 关卡新增关卡、任务与地块位置数据。

Bug Fixes:
- 当小游戏选择为空或未知时,显示专用提示,而不是静默失败。
- 将未知的“两位字母-数字”形式的关卡视作已过期活动关卡,而不是常驻关卡。
- 在包括 txwy 在内的所有客户端上允许幻影肉鸽难度 15。
- 通过放宽匹配模式,改进 MacGui 问题自动打标签的 issue 检查器配置。
- 避免在 lldb 中包装冒烟测试,从而使脚本能在没有调试器的环境中运行。

Enhancements:
- 扩展小游戏提示,覆盖更多小游戏变体,例如 HoneyFruit 对决频道。
- 调整资源、CLI 二进制文件与模板的优化设置,以匹配新版本内容。

Build:
- 调整冒烟测试工作流的权限,只请求对仓库内容的只读访问。

CI:
- 简化 CI 中调用冒烟测试脚本的方式,改为直接运行测试二进制文件,而不附加调试器。

Tests:
- 更新冒烟测试工具和日志,以便在新版本内容下运行面向各客户端的自动化检查。

Chores:
- 刷新多类游戏数据资源文件(战斗、基建、物品、关卡、任务以及本地化)以适配新版本。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare v5.28.4 by updating game content data and polishing minigame,
roguelike, tooling, and CI behavior across clients and platforms.

New Features:
- Load minigame task options dynamically based on the selected game
client type.
- Add new stage, task, and tile-position data for the latest activities
and UR stages.

Bug Fixes:
- Handle unknown or empty minigame selections by showing a dedicated tip
instead of failing silently.
- Treat unknown two-letter dash numeric stages as expired activity
stages instead of permanent ones.
- Allow Phantom roguelike difficulty 15 on all clients, including txwy.
- Improve MacGui issue auto-labeling by broadening the matching patterns
in the issue checker configuration.
- Avoid wrapping smoke tests in lldb so the script can run in
environments without the debugger.

Enhancements:
- Extend minigame tips to cover additional minigame variants such as
HoneyFruit duel channel.
- Refine resources, CLI binary, and template optimization settings to
align with the new release content.

Build:
- Adjust smoke testing workflow permissions to only request read access
to repository contents.

CI:
- Simplify the smoke testing script invocation in CI to run the test
binary directly without debugger attachment.

Tests:
- Update smoke testing tooling and logs for running client-specific
automated checks with the new release content.

Chores:
- Refresh multiple game data resource files (battle, infrastructure,
items, stages, tasks, and localization) for the new release.

</details>

</details>
2025-12-06 00:13:02 +08:00
github-actions[bot]
bd0681a437 docs: Auto Update Changelogs of v5.28.4 (#14959)
* docs: Auto Generate Changelog of Release v5.28.4

* docs: Auto Update Changelogs of v5.28.4 (#14960)

* Initial plan

* docs: Update CHANGELOG.md v5.28.4 per formatting guidelines

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Refine precommit template description

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Add separator and preserve v5.28.3 content

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Apply version merge rules for v5.28.4 patch release

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-12-06 00:10:34 +08:00
uye
4feb2f109b perf: 调整 UpdateMiniGameTaskList 2025-12-05 18:44:55 +08:00
HY
765b9acb1c feat: 當左上角進行中活動因太多被折疊時,增加展開領取的狀態判斷 (#14957)
* feat: 當左側進行中活動列表折疊時,增加展開領取的狀態判斷

* chore: 放個圖片

* chore: 加個保底任務 & 補充說明文字

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: 移除 "maxTimes"

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-05 18:22:27 +08:00
晓丶梦丶仁
bdeebe80e0 rft: Minigame ToolboxViewModel (#14951)
* rft: Minigame ToolboxViewModel

* fix: Invalid Task Name

* feat: Invalid Task Tip

* fix: key name
2025-12-05 17:07:46 +08:00
github-actions[bot]
df9f458a6f chore: Auto Update Game Resources - 2025-12-05
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19957243176

[skip changelog]
2025-12-05 08:30:31 +00:00
uye
ee7a61974b feat: 关卡选择验证输入,非当期活动的关卡名会当做未开放关卡 2025-12-05 16:11:11 +08:00
uye
b4887ae836 feat: UR 活动导航 2025-12-05 16:11:11 +08:00
github-actions[bot]
ca23e700c8 chore: Auto Update Game Resources - 2025-12-05
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19954805469

[skip changelog]
2025-12-05 06:31:21 +00:00
github-actions[bot]
2a4b9097c3 chore: Auto Update Game Resources - 2025-12-04
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19947291234

[skip changelog]
2025-12-04 23:29:22 +00:00
github-actions[bot]
97a45542f3 chore: Auto Update Game Resources - 2025-12-04
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19942256933

[skip changelog]
2025-12-04 20:03:59 +00:00
github-actions[bot]
226b21d32a feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19910040375
[skip changelog]
2025-12-03 21:52:50 +00:00
HY
5b49d406c9 chore: 調整繁中服傀影肉鴿能夠選擇的難度 (#14952) 2025-12-03 19:40:29 +01:00
HY
6dd412364b fix: 繁中服周年月卡領取及贈送單抽的處理錯誤 (#14953) 2025-12-04 01:37:08 +08:00
Rbqwow
55b9ce4c7d fix: issue-checker.yml 中 MacGui 正则不包含 MacGui 2025-12-04 01:13:00 +08:00
github-actions[bot]
0acdf51077 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19874728857
[skip changelog]
2025-12-02 21:52:33 +00:00
Status102
a92d429ab3 ci: smoke_test remove lldb (#14942)
ci: fix unthrow smoke_test error
2025-12-03 01:11:38 +08:00
萨拉托加
7eccc8674b fix: 卫戍协议因网络问题卡在结算界面 2025-12-02 23:35:24 +08:00
uye
b61e04dcfc fix: 代理失败后等待动画结束后再点击任务失败
fix #14937
2025-12-02 17:55:04 +08:00
uye
dd7c6d0a85 fix: 自定义基建排班使用无人机加速未进驻干员的设施导致卡死
fix #14933
2025-12-02 17:38:58 +08:00
github-actions[bot]
79469f2047 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19838737544
[skip changelog]
2025-12-01 21:52:29 +00:00
Drest
0ea6626435 fix: 干员识别异常(荒芜拉普兰德) (#14934) 2025-12-01 10:29:27 +00:00
AnnAngela
bde9b78a60 ci: Potential fix for code scanning alert no. 109: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-30 23:47:58 +08:00
Constrat
53498f0d54 fix: precommit
precommit is fucking useless. It pushes the optimized templates in the PR, but it still throws the stupid failed check.
2025-11-29 23:25:38 +01:00
HY
ccdc37dbc3 chore: 更新繁中服部分基建設施截圖 (#14923)
* chore: 更新繁中服部分基建設施截圖

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: HY <momomochi987@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-29 23:20:27 +01:00
uye
746e62226f Release v5.28.3 (#14920)
## Summary by Sourcery

调整异常日志的基址解析方式,精炼调试文件保留策略,在 CI 中打包 Windows 调试符号,并为新版本更新配置、模板和任务资源。

New Features:
- 在 `txwy` 资源命名空间下,为小游戏与关卡新增全局任务配置。

Enhancements:
- 更改异常基址查找逻辑,以解析当前模块,从而在各平台上提供更精确的栈追踪日志。
- 收紧调试日志默认清理阈值,以减少调试文件的数量和存活时间。
- 根据新版本内容更新资源配置、本地化文件、GUI 资源以及模板优化设置。

CI:
- 在上传为 CI 构建工件前,将 Windows PDB 调试符号压缩为带版本号的 ZIP 存档,并在之后从安装目录中清理这些符号文件。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Adjust exception logging base address resolution, refine debug file
retention defaults, package Windows debug symbols in CI, and update
configuration, templates, and task resources for the new release.

New Features:
- Add new global task configurations for minigames and stages under the
txwy resource namespace.

Enhancements:
- Change exception base address lookup to resolve the current module for
more accurate stacktrace logging across platforms.
- Tighten default debug log cleanup thresholds to reduce the number and
lifetime of debug files.
- Update resource configs, localization files, GUI assets, and template
optimization settings in line with the new release content.

CI:
- Compress Windows PDB debug symbols into versioned ZIP archives before
uploading them as CI artifacts and clean them from the install directory
afterward.

</details>
2025-11-29 21:39:03 +08:00
Status102
784baa5a2a perf: debug下非根路径文件限3日内 (#14919) 2025-11-29 19:05:23 +08:00
github-actions[bot]
849c34c7fe docs: Auto Update Changelogs of v5.28.3 (#14921)
* docs: Auto Generate Changelog of Release v5.28.3

* docs: Auto Update Changelogs of v5.28.3 (#14922)

* Initial plan

* docs: Update CHANGELOG.md for v5.28.3 following generation rules

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Improve changelog text capitalization and formatting

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Append v5.28.3 changelog to existing v5.28.x release notes

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Bump version to v5.28.3 and update highlights

Updated version number and highlighted bug fixes.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-11-29 18:57:05 +08:00
github-actions[bot]
008252f3c8 chore: Auto Templates Optimization
Triggered by d24bd20919

[skip changelog]
2025-11-29 10:12:16 +00:00
uye
d24bd20919 fix: yj 的小杯 UI 2025-11-29 18:11:37 +08:00
uye
34acc37961 perf: 调整小游戏描述 2025-11-29 17:42:24 +08:00
uye
b2111f7d8b feat: 支持 PV 小游戏从当前关卡开始 2025-11-29 17:24:17 +08:00
uye
ab9faff55b perf: 优化 PV 小游戏部分复杂背景关卡的识别 2025-11-29 17:06:54 +08:00
uye
aaa2cb8fd7 perf: 优化 卫戍协议 流程 2025-11-29 16:42:52 +08:00
uye
9336144892 perf: 优化 PV 小游戏识别范围,提高识别率 2025-11-29 16:42:15 +08:00
uye
131eda9dfb fix: PV 小游戏进入关卡时遇到网络连接会少选烟花样片 2025-11-29 16:11:01 +08:00
uye
f2a3f84180 chore: debug 截图默认保存最近 10 张 2025-11-29 16:00:16 +08:00
status102
629bb9e576 chore: format 2025-11-29 12:24:38 +08:00
HY
56d311ebdb chore: 繁中服「眾生行記」活動導航 (#14908)
Co-authored-by: HY <momomochi987@users.noreply.github.com>
2025-11-29 00:28:41 +08:00
HY
139d812c0b chore: 繁中服「爭鋒頻道:青草城」小遊戲 (#14906)
chore: 繁中服「爭鋒頻道:青草城」

Co-authored-by: HY <momomochi987@users.noreply.github.com>
2025-11-29 00:28:27 +08:00
status102
a373f7bf8e fix: 改漏了 2025-11-28 23:43:29 +08:00
status102
1bb6012cd8 fix: 压缩win平台的pdb文件 2025-11-28 23:37:48 +08:00
status102
426b785b21 fix: MaaCore Base Address 2025-11-28 23:23:38 +08:00
Hao Guan
8ec9023112 feat(mac): PV小游戏 2025-11-28 20:32:45 +08:00
uye
4edf912ecd Release v5.28.2 (#14901) 2025-11-28 18:59:50 +08:00
uye
07c01a6777 docs: 更新 CHANGELOG.md 2025-11-28 18:54:46 +08:00
github-actions[bot]
fbd2a6eb82 chore: Auto Templates Optimization
Triggered by f4f7a9d5a1

[skip changelog]
2025-11-28 10:51:58 +00:00
pre-commit-ci[bot]
f4f7a9d5a1 chore: Auto update by pre-commit hooks [skip changelog] 2025-11-28 10:51:38 +00:00
不留
d1cdd26176 fix: 裁剪 PV 小游戏 06-14 模板图以尽可能提高识别分数 (#14900)
* fix: 裁剪模板图以尽可能提高识别分数

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-28 18:43:24 +08:00
uye
f82ce2acad Release v5.28.1 (#14864)
Important [fix:
regex_error(error_badrepeat)](4861e96ddc)

<img width="1549" height="236" alt="image"
src="https://github.com/user-attachments/assets/0be3c81c-0281-4716-bae2-85a9fc5507db"
/>

My mistake a week ago.
Pushed a typo in the Sami I.S. regex

## Summary by Sourcery

为 v5.28.1 版本发布做准备,包括配置微调、自动化更新和资源刷新。

Bug Fixes:
- 在解析战斗编队前重置 support-unit 使用状态,以避免在多次运行之间出现陈旧状态。
- 在使用扁平化安装(flattened installs)时修正安装配置,确保库路径和安装目标位置设置一致。

Enhancements:
- 为新版本刷新游戏/资源任务定义、关卡元数据以及版本信息。
- 更新模板优化配置,以与当前的资源布局保持一致。

Build:
- 在使用扁平化安装布局时,调整 CMake 配置以设置运行库/链接库的安装目标以及 RPATH。

CI:
- 在 CI、发布、资源同步、网站和维护任务中,将所有 GitHub Actions 工作流更新为使用 actions/checkout v6。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Prepare the v5.28.1 release with configuration tweaks, automation
updates, and resource refreshes.

Bug Fixes:
- Reset support-unit usage state before parsing battle formations to
avoid stale state between runs.
- Correct installation configuration when using flattened installs so
library paths and install destinations are set consistently.

Enhancements:
- Refresh game/resource task definitions, stage metadata, and version
information for the new release.
- Update template optimization configuration to align with the current
resource layout.

Build:
- Adjust CMake configuration to set runtime/library install destinations
and RPATH when using a flattened install layout.

CI:
- Update all GitHub Actions workflows to use actions/checkout v6 across
CI, release, resource sync, website, and maintenance jobs.

</details>
2025-11-28 16:19:52 +08:00
Copilot
58d974184f Release v5.28.1 (#14897)
* Initial plan

* docs: add PV-烟花筹委会 mini-game highlight to v5.28.1 changelog

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: move PV-烟花筹委会 highlight to top section with v5.28.1+ note

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Bump version to 5.28.1 and update changelog

Updated version from 5.28.0 to 5.28.1 and added new features.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-11-28 16:11:23 +08:00
uye
eebdb0e9f0 docs: Update CHANGELOG for version 5.28.1 2025-11-28 16:02:19 +08:00
uye
18a65f3b39 feat: pv 小游戏 (#14885)
* feat: pv 小游戏架子

* chore: Auto update by pre-commit hooks [skip changelog]

* feat: 1-5 关

* chore: Auto update by pre-commit hooks [skip changelog]

* feat: PV 小游戏 06-15 (#14888)

* feat: 06-15

* fix: 15

* fix: templates and threshold

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* chore: Auto update by pre-commit hooks [skip changelog]

* feat: 小游戏 16-20

* fix: 18-20 导航

* chore: Auto update by pre-commit hooks [skip changelog]

* feat: 添加 ui 入口

* fix: 全角数字

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: 不留 <weinibuliu@outlook.com>
2025-11-28 15:54:14 +08:00
status102
1d4a84dcca fix: 收集遗漏的MaaCore.pdb和MaaUtils/pdb 2025-11-28 14:36:11 +08:00
status102
69f3919b52 perf: wpf Debug压缩包切片增加时间前缀 2025-11-28 14:33:21 +08:00
github-actions[bot]
96d426f52c chore: Auto Update Game Resources - 2025-11-28
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19755551218

[skip changelog]
2025-11-28 06:04:54 +00:00
github-actions[bot]
b460703cdd chore: Auto Update Game Resources - 2025-11-28
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19754997403

[skip changelog]
2025-11-28 05:29:54 +00:00
uye
b7b010f97c fix: 基建换班卡死在无人机使用界面
fix #14751
2025-11-28 01:29:51 +08:00
github-actions[bot]
fdc1184ea0 chore: Auto Update Game Resources - 2025-11-27
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19740458310

[skip changelog]
2025-11-27 15:03:42 +00:00
DavidWang19
51c5fb44ee feat: 更新界园肉鸽商品列表 (#14882)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-27 12:27:00 +00:00
github-actions[bot]
ffbb46ba52 chore: Auto Update Game Resources - 2025-11-27
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19734077676

[skip changelog]
2025-11-27 11:03:19 +00:00
不留
d025969c82 refactor: 改进 ImageCropper (#14762)
* fix: 修复 ImageCropper 循环异常退出的问题

* feat: 允许 ADB 为空

* fix: 修复 input 为空时的异常

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: 规范变量命名

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-27 18:25:42 +08:00
github-actions[bot]
c9f3fb8053 chore: Auto Templates Optimization
Triggered by 9c2d6c3a30

[skip changelog]
2025-11-27 09:15:39 +00:00
uye
9c2d6c3a30 rft: 整理截图 2025-11-27 17:14:54 +08:00
github-actions[bot]
efda298a11 chore: Auto Templates Optimization
Triggered by fec5edd021

[skip changelog]
2025-11-27 08:11:27 +00:00
uye
fec5edd021 chore: 重命名文件夹 2025-11-27 16:08:57 +08:00
github-actions[bot]
ede4cd526e chore: Auto Update Game Resources - 2025-11-27
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19727964321

[skip changelog]
2025-11-27 07:04:13 +00:00
uye
8ac9610d66 chore: Update bug report template to simplify instructions
Removed redundant instruction about uploading error images from the debug directory.
2025-11-27 03:47:42 +08:00
uye
838790a6a1 chore: Refine descriptions in en-bug-report.yaml
Updated descriptions in the bug report template for clarity and formatting.
2025-11-27 03:46:50 +08:00
uye
cef398b417 chore: Update descriptions in cn-bug-report.yaml 2025-11-27 03:43:03 +08:00
github-actions[bot]
f09dbd2f49 docs: Auto Update Changelogs of v5.28.1 (#14879)
* docs: Auto Generate Changelog of Release v5.28.1

* [WIP] Update changelogs for version v5.28.1 (#14881)

* Initial plan

* docs: Update CHANGELOG.md following changelog generation guidelines

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Update CHANGELOG with recent fixes and improvements

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-11-27 03:37:46 +08:00
uye
46b8d41998 rft: 整理一下截图 (#14878)
* rft: 整理一下截图

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-27 02:59:56 +08:00
SherkeyXD
695ca69da6 chore: remove and sort usings (#14877) 2025-11-27 02:55:57 +08:00
DavidWang19
84fe358011 feat: 更新肉鸽协议文档和界园肉鸽商品列表 (#14873)
* feat: 更新肉鸽协议文档和界园肉鸽商品列表

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 将no修改为No

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-27 02:54:58 +08:00
uye
c4b363da3d feat: 刷理智失败次数达到上限时报错 2025-11-27 01:28:32 +08:00
uye
3177e2a51d fix: 功能入口 (#14872)
* fix: 功能入口

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: 调整任务

* chore: 重试时只检测对应主题

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-27 01:03:02 +08:00
travellerse
46cea84d7d fix: 避免通宝插件通过任务链作用到通宝以外的地方 (#14867) 2025-11-27 00:35:27 +08:00
Rbqwow
753637609d docs: issue模板修改25mb压缩包上传提示 (#14850)
* docs: 25mb

* i18n: add 25MB upload limit message to English bug report template (#14858)

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2025-11-27 00:34:20 +08:00
Constrat
4861e96ddc fix: regex_error(error_badrepeat) 2025-11-25 21:39:56 +01:00
status102
2003772ddf fix: 重置助战干员为未编入
link to #14859
2025-11-26 00:53:41 +08:00
github-actions[bot]
8c76a62230 chore: Auto Update Game Resources - 2025-11-25
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19677269535

[skip changelog]
2025-11-25 16:49:03 +00:00
uye
3511a426de chore: 调整 StartToVisit 阈值
fix #14853

相关工作项: #14
2025-11-25 16:01:25 +08:00
MistEO
9f8da17db1 build: set RPATH_LIBRARY_INSTALL_DIR (#14854) 2025-11-25 13:22:41 +08:00
github-actions[bot]
4eff74e5b1 chore: Auto Templates Optimization
Triggered by fdb89a6d4e

[skip changelog]
2025-11-24 16:43:56 +00:00
uye
fdb89a6d4e fix: 齐聚主题会在基建同时存在红蓝两个提示的时候无法进入
fix 14746
2025-11-25 00:43:27 +08:00
MistEO
8a73d922e0 feat: update meojson to v5.0.0 (#14849) 2025-11-25 00:29:46 +08:00
dependabot[bot]
36084974d1 ci: bump actions/checkout from 5 to 6 in /.github/workflows in the github-actions group (#14847)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 23:39:04 +08:00
uye
27027dbdfa Release v5.28.0 (#14833)
发正式版,先别进新东西

## Summary by Sourcery

Prepare battle processing, vision handling, roguelike copper management,
and CI smoke testing for the v5.28.0 release.

Bug Fixes:
- Allow skill usage actions to correctly handle drone deployments by
mapping tile locations to dynamically registered operator names.
- Prevent region-of-interest calculations from exceeding image bounds by
clamping rectangles safely and logging out-of-range inputs.
- Avoid smoke-test workflow failures when cache key generation fails by
making the step non-fatal and guarding cache restore on a valid key.

Enhancements:
- Centralize registration of deployed operators into a reusable helper
to keep battlefield state consistent.
- Standardize logging in the roguelike coppers task plugin to use the
project logging macros and clean up unused includes.
2025-11-24 16:55:52 +08:00
github-actions[bot]
d828cdb078 docs: Auto Update Changelogs of v5.28.0 (#14836)
* docs: Auto Generate Changelog of Release v5.28.0

* docs: Optimize changelog formatting and organization for v5.28.0 (#14837)

Reformatted changelog entries to follow project conventions: merged
related commits, fixed CJK/Latin number spacing, reordered sections by
language, clarified vague descriptions, and added Highlights section.

**Changes:**

* **Added Highlights section** - Created bilingual (Chinese/English)
highlights focusing on 5 key user-facing improvements:
  1. Task error log screenshot viewing on hover for intuitive debugging
2. Debug screenshot packaging with multi-volume support (20 MB per
volume) for flexible uploads
  3. Smart auto support unit borrowing when only one operator is missing
  4. Optimized auto-battle page layout
5. Integrated Strategies fixes (boss recognition, Tongbao parsing, event
recognition, task chains)
* **Merged duplicate entries** - Combined 3 "Release beta.2" PRs, 2
"Auto Update Changelogs", and related bug fixes (e.g., 通宝解析 fixes
#14802/#14820/#14829)
* **Fixed number spacing** - Added spaces around numbers in mixed
CJK/Latin text per convention (e.g., "第三层" → "第 3 层", "8识别成g" → "8 识别成
g")
* **Reordered sections** - Chinese entries first, English-only entries
last within each category
* **Improved clarity** - Replaced vague commit messages with descriptive
text (e.g., "投资入口不知道为啥没点进去" → "投资入口识别失败")
* **Fixed categorization** - Moved "修复 '入暂亭' 事件" from Improved to Fix
section

Removed uninformative entries like "擦屁股", "unused", "去掉勾选框" that don't
describe actual changes.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

* feat: Revise changelog for version 5.28.0

Updated highlights and added new features for better debugging and auto-battle experience.

* doc: Update CHANGELOG.md for recent feature enhancements

* doc: Update CHANGELOG with recent fixes and optimizations

* docs: Revise CHANGELOG for clarity and detail

Updated the CHANGELOG with improved error handling descriptions and clarified features for 'Generate Support Payload' and 'Copilot'.

* docs: changelog

* docs: Update CHANGELOG with recent fixes and optimizations

* chore: EN issues address

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: AnnAngela <naganjue@vip.qq.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: Status102 <102887808+status102@users.noreply.github.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-11-24 16:47:56 +08:00
Copilot
a778ff84d9 fix: propagate errors from parallel downloads in res-update-game workflow (#14794)
* Initial plan

* fix: properly handle errors in parallel downloads for stages.json

Co-authored-by: AnnAngela <9762652+AnnAngela@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: AnnAngela <9762652+AnnAngela@users.noreply.github.com>
2025-11-24 09:30:03 +01:00
uye
95133cfeae fix: 部分名片无法进入线索交接
fix #14841
2025-11-24 14:40:26 +08:00
github-actions[bot]
4f7ba196c3 chore: Auto Update Game Resources - 2025-11-24
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19624349036

[skip changelog]
2025-11-24 05:29:59 +00:00
travellerse
e4644f7d2f fix: 修复放弃通宝的后续任务逻辑 (#14840) 2025-11-24 13:28:03 +08:00
uye
12846c9689 fix: 移除传入的 save_cnt 参数 2025-11-24 13:22:58 +08:00
github-actions[bot]
4fef683612 chore: Auto Templates Optimization
Triggered by a0547bee50

[skip changelog]
2025-11-24 05:11:49 +00:00
uye
a0547bee50 fix: 在未进入缩小的全局总览的时可能进错宿舍 2025-11-24 13:11:20 +08:00
pre-commit-ci[bot]
9f0e6e104c chore: Auto update by pre-commit hooks [skip changelog] 2025-11-24 05:00:32 +00:00
uye
e0b67b1523 fix: 大括号位置错误 2025-11-24 12:57:35 +08:00
uye
31520afb37 fix: image 长宽等于 0 时提前返回 2025-11-24 12:48:08 +08:00
uye
bf30c84b4f chore: 完全越界时报 error 2025-11-24 02:46:18 +08:00
uye
5c6f654762 fix: 避免输出空矩阵 2025-11-23 16:23:50 +08:00
uye
127d3a670c perf: 简化 ROI 修正逻辑 2025-11-23 16:15:10 +08:00
Status102
58d001744e feat(MaaCore): Copilot支持切换技能用法使用坐标 (#14818)
* feat: 支持切换技能用法使用坐标

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: usage

* fix: const ref

* perf: capture

* fix: case define

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-23 15:55:13 +08:00
status102
0d3a7ba48f fix: unused 2025-11-23 15:28:23 +08:00
status102
9b8686778d chore: 移除部分无需的include 2025-11-23 13:48:07 +08:00
晓丶梦丶仁
61489e4890 fix: KR 引航 2025-11-23 12:43:51 +08:00
uye
16bccd9876 fix: 擦屁股 2025-11-23 02:29:54 +08:00
uye
30fcea747b fix: StartUp 为什么要进终端 2025-11-23 01:54:52 +08:00
MistEO
44aec32649 ci: continue on bad cache key 2025-11-22 22:48:20 +08:00
uye
3cfcffbe16 Release v5.28.0-beta.2 (#14831)
一波三折!

## Summary by Sourcery

CI:
- Allow GitHub Actions cache steps to continue on error across multiple
workflows, preventing cache failures from breaking CI runs.
2025-11-22 22:42:58 +08:00
MistEO
3bec98b7ce ci: continue on error for all actions/cache 2025-11-22 22:23:36 +08:00
MistEO
889313fe36 ci: continue on cache maadeps error 2025-11-22 22:19:06 +08:00
uye
9db5f5a43b Release v5.28.0-beta.2 (#14827)
## Summary by Sourcery

Tighten roguelike copper exchange handling and improve debugging support
for copper recognition issues.

Bug Fixes:
- Ensure exactly one copper is detected in the left column during
exchange mode and fail fast otherwise.
- Fix the created copper’s position and logging to consistently use the
top-left slot coordinates.
- Stop silently continuing when copper creation fails by treating it as
a hard failure.

Enhancements:
- Add debug image capture for unexpected left-column copper counts and
for newly detected coppers.
- Always compile the copper detection debug drawing and image-saving
helpers regardless of debug flags.

Documentation:
- Update the documented path for saved debug images when unknown copper
names are encountered.
2025-11-22 21:42:40 +08:00
travellerse
d3f038b1ce fix: 修正通宝识别中的坐标 (#14829)
* fix: 修正通宝识别中的坐标

* fix: 添加Sarkaz关掉进入事件窗口的模板
2025-11-22 21:39:43 +08:00
travellerse
46d0fd2e5c fix: 处理左侧通宝解析失败的情况 (#14820)
* fix: 处理左侧通宝解析失败的情况

* fix: 更新调试图像保存路径至 debug/roguelike/coppers/unknown 目录

* fix: 优化通宝处理逻辑

* fix: 限制一下变量作用域

* fix: 移除ASST_DEBUG
2025-11-22 20:57:09 +08:00
github-actions[bot]
2503f2bc68 chore: Auto Update Game Resources - 2025-11-22
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19594191480

[skip changelog]
2025-11-22 10:28:05 +00:00
uye
de8634bf29 Release v5.28.0-beta.2 (#14800)
## Summary by Sourcery

Improve copilot configuration UX, extend roguelike (JieGarden)
automation with copper handling, and refine tooling, workflows, and
diagnostics for better stability and observability.

New Features:
- Add structured JSON-based configuration with popup editor for copilot
user additional operators, including optional skill and module fields.
- Introduce automated JieGarden copper pickup and exchange logic with
dedicated analyzers and config to optimize in-run decisions.
- Add UI theme task generation and image moving utilities to support
multi-theme homepage templates.

Bug Fixes:
- Ensure copilot log tooltips are closed and cleaned when clearing logs
to avoid lingering UI artifacts.
- Fix fight times unused warning trigger conditions so it only logs when
a finished run has remaining configured runs.
- Wait for reserve recruitment confirmation to disappear in JieGarden
recruit flow to prevent premature termination.
- Honor first-floor foldartal and start-with-elite-two flags correctly
so rerolling and early-exit behaviors are coordinated.
- Prevent GetImageFromROI cutter from crashing on unreadable images and
ensure crop regions are correctly resolved from base tasks.
- Handle GitHub API rate limiting and missing outputs more robustly in
the changelog generator and resource update workflows.

Enhancements:
- Refine copilot formation and support usage options, including a toggle
for support unit usage and updated formation index naming.
- Export operator box data including missing operators with default
metadata instead of only current user-stored entries.
- Warn users in logs when an outdated GPU driver is detected and include
localized messaging.
- Improve roguelike Bosky Passage routing by closing obstructive popups
before updating the map.
- Make InterfaceTask capture debug screenshots on failure to aid
troubleshooting.
- Simplify and harden changelog generation by restructuring commit
categorization, contributor resolution, and tree building logic.
- Modernize ROI-based image cutter to work off UiTheme task JSONs,
propagate shared crop docs, and respect per-template filenames.

Build:
- Adjust Windows nightly OTA CMake configuration to build with
RelWithDebInfo and publish PDB debug symbols for components.

CI:
- Tighten game resource download workflow with failing curl on HTTP
errors, coordinated job waiting, simpler artifact retries, and smarter
failure-comment management on the dev branch.

Documentation:
- Document JieGarden copper configuration schema and automatic
pickup/exchange behavior in the integrated strategy protocol docs.
- Clarify SECURITY policy to state that only the latest v5 stable
release receives security support.
2025-11-22 18:20:27 +08:00
github-actions[bot]
2e3fe293e6 docs: Auto Update Changelogs of v5.28.0-beta.2 (#14801)
* docs: Auto Generate Changelog of Release v5.28.0-beta.2

* docs: Optimize changelog formatting for v5.28.0-beta.2 (#14819)

* Initial plan

* docs: Optimize changelog formatting for v5.28.0-beta.2

- Merge similar commits (e.g., OCR replacement commits)
- Add spaces around numbers in Chinese/English mixed text (GPU, OCR, 20 MB)
- Sort entries: Chinese first, then English within each module
- Merge template optimization entries
- Optimize commit descriptions for clarity

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Update CHANGELOG with recent improvements and fixes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-11-22 18:18:38 +08:00
萨拉托加
c1cb1ee978 fix: 肉鸽问题修复 (#14654)
* perf: 萨米界园肉鸽添加并优化暂时撤退逻辑

* perf: 萨卡兹肉鸽关掉进入事件可能弹出的窗口

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: RolesConfirm不知道为啥点不进去

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-22 18:12:15 +08:00
uye
fc61ff8ea2 rft: 统一存截图 (#14825)
* rft: 统一存截图

* rft: 漏网之鱼

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 静态锁

* chore: map 改为全局

* fix: 避免溢出

* chore: 怎么整得这么麻烦

* perf: 避免额外std::format

* fix: ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2025-11-22 18:11:42 +08:00
Manicsteiner
285628a293 fix: copilot file name (#14821) 2025-11-22 14:24:17 +08:00
github-actions[bot]
8e906402fb chore: Auto Update Game Resources - 2025-11-21
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19582060835

[skip changelog]
2025-11-21 20:04:04 +00:00
uye
cf0a248ae1 ci: Update tools/ChangelogGenerator/changelog_generator.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-11-22 02:47:23 +08:00
uye
f232eacbb4 fix: 单文件模式下总是传递借助战 2025-11-22 02:44:17 +08:00
travellerse
c52f79cbaa fix: 修复界园树洞偶发点击到剩余烛火,导致无法进入下一个节点 (#14806)
* fix: 修复界园树洞偶发点击到剩余烛火,导致无法进入下一个节点

* rft: 使用task任务替代Matcher

* fix: 将弹窗检测置于节点识别前

* fix: 将检测任务retry_times设为0
2025-11-22 02:41:03 +08:00
uye
0978c10dca chore: 分卷压缩包大小改成 20 MB 2025-11-22 02:39:52 +08:00
Status102
b697fdc2c7 feat: MaaCore主任务错误时保存截图 (#14812)
* feat: MaaCore主任务错误时保存截图

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-22 02:33:31 +08:00
uye
5c37d751c7 perf: 优化自动战斗界面显示 (#14795)
* perf: 优化自动战斗界面显示

* fix: 不勾选战斗列表时也会吃理智药

* i18n: KR

* i18n: 加個空白

* i18n: EN

* i18n: JP

* rft: 使用自动换行

* style: increase size a bit

* perf: 优化界面布局

* rft: UserAdditional 改为序列化存储,增加自选模组

* fix: 列表过长时超链接无法显示

* perf: 未激活追加自定干员也可以进行编辑

* perf: 战斗列表自适应宽度

* chore: 按钮放上面

* perf: 优化日志栏宽度,占用 1/2 或 2/5

* perf: 突袭改成用背景色提示

---------

Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: momomochi987 <as99us301@gmail.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: Manicsteiner <Manicsteiner@outlook.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2025-11-22 02:30:44 +08:00
pre-commit-ci[bot]
07982cfebd chore: Auto update by pre-commit hooks [skip changelog] 2025-11-21 12:57:53 +00:00
SherkeyXD
ca21c9bcca chore: 更新多模板截图工具 2025-11-21 20:54:50 +08:00
github-actions[bot]
fbeed8083f chore: Auto Update Game Resources - 2025-11-20
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19541308413

[skip changelog]
2025-11-20 15:03:33 +00:00
Rbqwow
9ae8ca3ba8 feat: 为GPU加速添加超过两年的驱动版本检测 (#14690)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
2025-11-20 14:45:55 +00:00
SherkeyXD
b70d6b6b7f rft: 拆分多主题识别任务 (#14774)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: DavidWang19 <dwang0340@gmail.com>
2025-11-20 13:34:02 +00:00
Hao Guan
d6dbbf194f i18n(mac): KR 2025-11-20 18:38:49 +08:00
Hao Guan
fe134e2587 chore(mac): 修复UI细节 2025-11-20 16:58:49 +08:00
github-actions[bot]
b3539e6f27 chore: Auto Update Game Resources - 2025-11-20
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19528514707

[skip changelog]
2025-11-20 07:03:47 +00:00
Manicsteiner
3f06c13ff8 chore: SSS#8 for global (#14803) 2025-11-19 17:59:56 +01:00
Constrat
036f1c55ae fix: reduce template size for QuickFormation RL 2025-11-19 17:37:56 +01:00
Constrat
bba94660d7 perf: optimize templates 2025-11-19 17:36:37 +01:00
uye
0963e88112 fix: RA 导航错误 2025-11-19 23:15:16 +08:00
uye
bbb48127ff rft: 调整 ExportOperBox 内的变量命名与结构 2025-11-19 23:08:49 +08:00
travellerse
88acc9e83d fix: 修复通宝配置解析逻辑 (#14802) 2025-11-19 23:03:52 +08:00
SherkeyXD
38a7710387 style: changelog 生成器格式化 2025-11-19 20:30:53 +08:00
github-actions[bot]
9a7318942c feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19498803186
[skip changelog]
2025-11-19 10:54:03 +00:00
萨拉托加
48bb385211 fix: 从主页进入终端点过头后返回 (#14698)
* fix: 从主页进入终端点过头后返回

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-19 18:52:16 +08:00
Weiyou Wang
cb897863f6 fix: 修复集成战略萨米主题下凹密闻板相关功能 (#14755) 2025-11-19 18:50:32 +08:00
travellerse
d25f8e934c fix: 保存招募券结束后等待确认招募按钮消失 (#14773)
* fix: 保存招募券结束后加点延时

* fix: 增加确认招募按钮消失的等待逻辑

* fix: 添加确认按钮未消失时继续招募流程
2025-11-19 18:50:03 +08:00
uye
5d75c247be ci: 更新下 changelog 2025-11-19 18:49:23 +08:00
travellerse
f08fdd0548 fix: 修正不期而遇事件名ocr以区分禳解的三个相近选项 (#14799) 2025-11-19 18:11:02 +08:00
status102
06f793cf59 ci: nightly版恢复pdb文件生成及上传 2025-11-19 17:47:38 +08:00
status102
8b61cac331 fix: 刷理智指定次数未完全消耗警告在剩余理智也会提示 2025-11-19 16:51:51 +08:00
status102
807a3d472d fix: 干员识别复制结果到剪贴板时丢失未拥有干员 2025-11-19 15:53:27 +08:00
status102
4a71452841 fix: 移除过旧的add_user_additional参数弃用提示 2025-11-19 15:53:05 +08:00
github-actions[bot]
d5b6d2fe60 chore: Auto Update Game Resources - 2025-11-19
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19493348827

[skip changelog]
2025-11-19 07:28:02 +00:00
travellerse
ac7d449584 feat: 适配界园肉鸽通宝交换 (#13835)
* feat: 初步实现界园肉鸽通宝交换

* feat: 实现通宝交换后弹窗点击

* fix: 使用ocr作为通宝交换完成的标志

* fix: 给通宝弹窗确认的 pre_task 加上 postDelay

* fix: 小错误修改

* fix: 添加ocrReplace

* feat: 给通宝赋予临时权重,之后再改

* refactor: 重构通宝任务插件,拆分复杂的_run

* fix: 修正通宝选择点击错误

* refactor: 把滑动函数改回直观

* feat: 新增已投出时的通宝丢弃权重

* fix: 更新通宝名称匹配规则

* chore: 增加注释和日志输出

* chore: 添加调试截图保存

* fix: 清理未使用的参数

* fix: 微调通宝权重

* fix: 修正保存截图过多

* fix: 修复Rect不匹配造成的错误

* fix: 调整debug截图

* fix: 修正选择通宝时位置错误

* fix: 修复刷不交换通宝时无法退出

* fix: 修改`已投出`识别得分的绘制位置

* fix: 启用不期而遇`饕餮廊`获取通宝

* fix: 调整通宝识别区域宽度

* fix: 添加`厉-安硕` -> `厉-安硕鼷`的替换

* fix: 为通宝名称未匹配产生的debug截图添加方框

* fix: 修正debug截图方框位置

* fix: 清理无用的ocrReplace

* fix: 删除通过任务给插件传递特殊参数

* fix: 增加"衡-霹雳"和"花-圣诏封神"的ocr替换

* docs: 添加界园肉鸽通宝交换文档

* fix: 默认刷开局模式交换通宝

* fix: 删除未使用的通宝列表行数变量

* fix: 通宝交换完成识别增加延迟

* fix: 增加"衡-军屯垦"的ocr替换

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 修正调试图像保存路径

* perf: 优化通宝创建逻辑

* refactor: 更新通宝任务模式名称

* refactor: 更新通宝稀有度键值

* chore: 更新通宝优先级

* fix: 通宝列表匹配时可能会将y轴间隔覆盖为0

* perf: 将交换通宝的信息发送到wpf

* perf: 将通宝调试截图改为jpeg

* fix:  添加"衡-旱热"的ocr替换

* refactor: 传递任务执行结果

* feat: 初步动态识别通宝列表

* perf: 将期望为空的识别逻辑改为期望匹配到

* chore: 为通宝类型模板添加mask

* refactor: 重构通宝识别逻辑

* refactor: 提取保存调试图像

* refactor: 使用std::format优化日志输出

* refactor: 收尾

* chore: 微调滑动距离

* fix: 忘了加maskRange了

* chore: 保留score小数点后六位

* fix: 修复神秘的点击停止后卡死问题

* docs: 更新文档

* docs: 添加通宝识别流程示意图

* fix: 更新通宝稀有度定义

* chore: 添加通宝交换模式的图片示意注释

* chore: 加点注释

* perf: 预分配通宝和检测结果的空间

* chore: 优化运行时状态变量注释

* fix: 仅在确实已被投出时绘制已投出的调试方框

* fix: 修正坐标变量名称以符合语义

* perf: 滑动误差较大时额外滑动一次进行回正

* fix: 仅在缓慢滑动时校准位置

* refactor: 优化通宝列表滑动

* fix: 尝试修复偶发通宝最后一列无法识别

* fix: 移除了 999

* fix: 进一步修复滑动

* chore: 更新未知通宝调试图像保存路径

* fix: 更改调试截图保存位置和matcher使用图片初始化

* fix: 添加"厉-一字落"的ocr替换

* fix: 适配MaaUtils的更改

* chore: 调整任务顺序

* chore: 添加通宝重投和开关钱盒任务配置

* chore: 文件头/注释调整

* rft: meojson反序列化

* chore: Auto update by pre-commit hooks [skip changelog]

* perf: 替换部分新log输出

* i18n: KR

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
2025-11-19 15:22:33 +08:00
Weiyou Wang
e9bc53cb6d fix: 上调助战栏位匹配分数阈值 (#14796) 2025-11-18 21:54:06 +00:00
AnnAngela
990907fdb1 chore: Revise security support to only include v5 [skip changelog]
Updated security policy to indicate support only for v5.
2025-11-18 23:45:13 +08:00
Constrat
a4ca4ffda9 ci(testing): game resource update error comment tweaks and changes 2025-11-18 16:11:14 +01:00
AnnAngela
8e9c648f0e ci: Change curl command to fail on error
cc @Constrat
2025-11-18 22:31:57 +08:00
github-actions[bot]
b2231e3392 chore: Auto Templates Optimization
Triggered by 70075152df

[skip changelog]
2025-11-18 12:11:17 +00:00
uye
70075152df fix: 通关角标 2025-11-18 20:10:38 +08:00
travellerse
d8000250dc fix: 添加不期而遇事件名ocr替换 (#14588)
* fix: 添加不期而遇事件名ocr替换

* fix: 添加"找黍溯果"的ocr替换

* fix: 更新JieGarden的OCR替换规则
2025-11-18 19:58:13 +08:00
Constrat
37299f8758 fix: Sami IS EN 3rd floor regex 2025-11-18 11:39:52 +01:00
github-actions[bot]
bdd747fe2a chore: Auto Update Game Resources - 2025-11-18
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19457757314

[skip changelog]
2025-11-18 07:27:47 +00:00
status102
e71ade9573 chore: 路径迁移 2025-11-18 15:19:25 +08:00
Constrat
b77b8e55e5 fix: regex AD navigation EN 2025-11-17 20:06:48 +01:00
AnnAngela
222af5e23c ci: Simplify resource update workflow (#14785)
* ci: Simplify resource update workflow

Removed unnecessary delay and re-download steps for resources.

* ci: Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ci: Remove continue-on-error from download steps

Removed 'continue-on-error' option from multiple download steps.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-17 17:41:08 +01:00
github-actions[bot]
0014167468 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19412598245
[skip changelog]
2025-11-16 21:52:53 +00:00
uye
56a83bb8d7 feat: 清日志的时候把 ToolTip 手动清除一下 2025-11-16 03:32:39 +08:00
uye
fe71d9ea1c Release v5.28.0-beta.1 (#14767) 2025-11-16 03:13:09 +08:00
github-actions[bot]
565b8fa7f9 docs: Auto Update Changelogs of v5.28.0-beta.1 (#14768)
* docs: Auto Generate Changelog of Release v5.28.0-beta.1

* docs: Optimize changelog formatting for v5.28.0-beta.1 (#14769)

* Initial plan

* docs: Optimize changelog formatting per review guidelines

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Update CHANGELOG for v5.28.0-beta.1

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-11-16 03:02:46 +08:00
uye
b71f0b0a9f feat: 卫戍协议:盟约 小游戏 (#14763)
* feat: 卫戍协议:盟约 小游戏

* chore: Auto update by pre-commit hooks [skip changelog]

* feat: 调整描述

* chore: Auto update by pre-commit hooks [skip changelog]

* i18n: EN tweak

* i18n: KR tweak

* i18n: EN tweak

* feat: mac 卫戍协议:盟约

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
2025-11-16 02:42:44 +08:00
Weiyou Wang
abe9affa44 fix: 进一步调整 WpfGui 助战选项显示布局 2025-11-16 00:32:14 +11:00
uye
e20508d46e fix: 自动借助战错误显示 2025-11-15 20:17:20 +08:00
HX3N
6427fdd609 i18n: KR tweak SupportUnitUsage translation 2025-11-15 13:20:51 +09:00
Status102
5c86b4b875 docs: integration zh可读性增强 (#14756)
docs: integration zh可读性增强 (#14754)

* docs: integration zh可读性增强

* docs: 再加一点

* docs: all in

* chore: Auto update by pre-commit hooks [skip changelog]

* docs: 去掉点多余的换行

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-14 22:22:48 +08:00
uye
c3f870e51e fix: 干员识别包含 盟约·辅助干员 和 领主·Sharp 2025-11-14 18:49:32 +08:00
github-actions[bot]
b99f1d4776 chore: Auto Templates Optimization
Triggered by 0d13aed500

[skip changelog]
2025-11-14 09:03:43 +00:00
github-actions[bot]
0d13aed500 chore: Auto Update Game Resources - 2025-11-14
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19359577330

[skip changelog]
2025-11-14 09:03:16 +00:00
Manicsteiner
5a1ea3c186 fix: JP paradox 2025-11-14 16:30:38 +08:00
github-actions[bot]
2c8c319657 chore: Auto Update Game Resources - 2025-11-14
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19358208540

[skip changelog]
2025-11-14 08:03:37 +00:00
Weiyou Wang
26a20755e1 rft: 修复、改进自动借助战功能 (#11105) 2025-11-14 14:20:45 +11:00
Weiyou Wang
e29d802c08 fix: 简化萨米肉鸽 "诡秘的预感" 相关任务链 (#14749) 2025-11-14 12:17:13 +11:00
Weiyou Wang
a84e87f5e7 fix: 给 open_series_list 加上失败截图机制 (#14693) 2025-11-14 12:16:41 +11:00
Weiyou Wang
6662457428 refactor: 修复 "入暂亭" 事件 (#14684) 2025-11-14 12:16:03 +11:00
Weiyou Wang
95ea200ede fix: 防止生息演算重置地图视图时因截图延迟卡死 (#14721) 2025-11-14 12:15:17 +11:00
Status102
3ded8b574a chore: 向MaaCore工程增加tasks文件以便检索 (#14731)
* chore: 向MaaCore增加tasks文件

* chore: 支持global
2025-11-14 01:23:24 +08:00
Manicsteiner
d11582f39f chore: JP ocr edits (#14748) 2025-11-13 17:02:25 +01:00
github-actions[bot]
eedee9e6ee chore: Auto Update Game Resources - 2025-11-13
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19337134611

[skip changelog]
2025-11-13 15:44:31 +00:00
github-actions[bot]
0a768d8804 chore: Auto Update Game Resources - 2025-11-13
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19326795251

[skip changelog]
2025-11-13 09:28:33 +00:00
HX3N
0ff3492415 fix: KR AD navigation (#14742) 2025-11-13 09:19:11 +01:00
Weiyou Wang
a4d4e39257 fix: ocrReplace for EN (#14740)
Co-authored-by: 萨拉托加 <151550168+saratoga-official@users.noreply.github.com>
2025-11-13 09:18:35 +01:00
github-actions[bot]
89ab18ea6c chore: Auto Update Game Resources - 2025-11-13
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19324207913

[skip changelog]
2025-11-13 07:43:04 +00:00
萨拉托加
332592d998 fix: 肉鸽可能卡进剧目获取界面和收藏品界面
fix #14723
2025-11-13 14:53:16 +08:00
uye
6a931760d6 feat: 去掉勾选框 2025-11-12 22:11:13 +08:00
status102
f0a509fb6f perf: std::signal 自动舍弃 abort / terminate 上方栈 2025-11-12 20:04:53 +08:00
Lucien Shaw
f096131e12 ci: 修正一个cli相关的action的输入 (#14730)
ci: 修正cli使用的一个action的输入
2025-11-12 09:08:51 +01:00
uye
8240390a8b chore: git blame 忽略 "c# 统一使用文件范围限定的 namespace"
[skip changelog]
2025-11-12 16:05:35 +08:00
Weiyou Wang
80c8f03b24 docs: 自动战斗文档添加 copilot_list, is_raid, is_paradox, loop_times 注释 2025-11-12 15:12:46 +08:00
uye
39a89f6361 rft: 日志汇报打包 debug 截图,支持分卷,修改存储路径 2025-11-12 14:15:18 +08:00
Weiyou Wang
74cad75e74 fix: build WpfGui for ARM architecture (#14722) 2025-11-12 12:27:02 +08:00
uye
376e929d96 feat: 任务错误日志鼠标悬浮可以查看出错时截图 2025-11-12 11:27:00 +08:00
萨拉托加
d370b5d5fe fix: 关卡复核会把8识别成g 2025-11-12 09:57:21 +08:00
Weiyou Wang
e2ac3ff4e4 fix: 肉鸽允许跳过招募组合直接开始初始招募 (#14713)
fix: 允许跳过招募组合直接开始初始招募
2025-11-12 09:12:38 +08:00
MistEO
1c233d21c4 ci: include prerelease for release-package-distribution
https://github.com/pozetroninc/github-action-get-latest-release

default 	"prerelease, draft"
2025-11-12 01:28:43 +08:00
MistEO
b7cca46076 ci: remove permissions restrictions 2025-11-12 01:23:51 +08:00
Lucien Shaw
bfacd31911 ci: 支持winget软件分发 (#14667)
* ci: 测试winget-releaser

* ci: 暂时禁用mirrorchyan

* Revert "ci: 暂时禁用mirrorchyan"

This reverts commit 83550ac47f.

* ci: release分发工作流支持指定tag

* ci: 修复判断语句

* ci: 修改主工作流的release分发部分

* ci: 添加权限

* ci: 设置默认版本tag为空

* ci: 尝试修复空版本号带来的问题

* ci: 使用独立工作流设置release tag

* ci: 补全仓库名称

* ci: 优化gh workflow run调用语句

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* style: 添加空格

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ci: use secrets and repos of MAA

* ci: 更新secrets名称

* ci: 版本分发工作流重命名

* ci: 匹配的名称变更

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 01:04:55 +08:00
萨拉托加
714e8e5511 fix: 投资入口不知道为啥没点进去 2025-11-11 23:26:40 +08:00
uye
0179825ff8 fix: 无法区分界园肉鸽第三层与第五层 boss、界园肉鸽第五层 boss 前暂停设置无效
fix #14641
2025-11-11 22:49:03 +08:00
uye
3fa5aa028a Release v5.27.4 (#14717)
有猪没合 changelog

## Summary by Sourcery

Update CHANGELOG.md to release version 5.27.4, detailing new features,
improvements, bug fixes, and other changes.

New Features:
- Add duplicate name check for auto battle groups
- Add difficulty selection tip for Guiyuan command squad savings
- Add minigame entry point on macOS

Bug Fixes:
- Fix monthly squad failing to auto-switch
- Improve recognition matching for the “gather” theme
- Fix unintended clicks in roguelike mode (double-speed and ClickToDrops
issues)

Enhancements:
- Update extreme efficiency one-day three-shift schedule table
(2025-11-11 revision)

Documentation:
- Bump version to v5.27.4 and document release notes in CHANGELOG.md

Chores:
- Update Dependabot CI members
- Preload ads for Global build
2025-11-11 22:06:23 +08:00
github-actions[bot]
6192e7d02b docs: Auto Update Changelogs of v5.27.4 (#14715)
* docs: Auto Generate Changelog of Release v5.27.4

* Initial plan

* Update CHANGELOG.md for v5.27.4

- Merge similar commits into single lines
- Sort entries within each category
- Preserve original changelog content (v5.27.3 and earlier)

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* Move v5.27.4 section to end of changelog

Patch version content should be placed at the end, after other v5.27.x patches, not at the beginning.

Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>

* docs: Update CHANGELOG for version 5.27.4

Updated version number to v5.27.4 and modified highlights, new features, improvements, and fixes sections.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ABA2396 <99072975+ABA2396@users.noreply.github.com>
2025-11-11 22:03:13 +08:00
uye
e5c48504cd Release v5.27.4 (#14714)
## Summary by Sourcery

Add duplicate detection in battle formation parsing with UI reporting,
refactor Roguelike plugin parameter loading, update CI action versions,
and adjust Dependabot assignees.

Bug Fixes:
- Prevent duplicate groups in battle formation and report parse failures
- Add UI handler to log BattleFormationParseFailed messages

Enhancements:
- Store deep_exploration_auto_iterate flag in Roguelike plugin and
simplify mode check
- Upgrade GitHub Actions versions for release and artifact upload
- Add lucienshawls to Dependabot assignees
2025-11-11 22:02:26 +08:00
github-actions[bot]
9b1bd1c70a chore: Auto Templates Optimization
Triggered by 5be311282e

[skip changelog]
2025-11-11 13:51:08 +00:00
uye
5be311282e perf: 优化齐聚主题模板图 2025-11-11 21:50:41 +08:00
萨拉托加
bb2325babc fix: 肉鸽ClickToDrops可能会点到藏品栏 2025-11-11 21:37:15 +08:00
github-actions[bot]
60fd50a3e5 feat: Update Submodules MaaMacGui, maa-cli
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19267340013
[skip changelog]
2025-11-11 13:35:49 +00:00
Constrat
4efef06aaa chore: update dependabot with ci members 2025-11-11 14:31:11 +01:00
dependabot[bot]
2bad5258e2 ci: bump the github-actions group in /.github/workflows with 2 updates (#14705)
Bumps the github-actions group in /.github/workflows with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [softprops/action-gh-release](https://github.com/softprops/action-gh-release).


Updates `actions/upload-artifact` from 4 to 5
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

Updates `softprops/action-gh-release` from 2.4.1 to 2.4.2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.4.1...v2.4.2)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: softprops/action-gh-release
  dependency-version: 2.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-11 14:26:45 +01:00
uye
7941a599e9 fix: 月度小队无法自动切换 2025-11-11 20:30:30 +08:00
Zsm1n
0066d3364e perf: 更新 243 极限效率一天三换排班表(20251111 修订) (#14708) 2025-11-11 11:25:12 +01:00
Status102
7b72b729b8 feat: 自动战斗新增组名重复检查 (#14710)
---------

Co-authored-by: HX3N <scarlet7518@gmail.com>
2025-11-11 10:35:18 +01:00
Hao Guan
a1d0dc9fea feat(mac): 喀兰小游戏界面提示 2025-11-11 17:25:30 +08:00
Hao Guan
abc2e618c7 fix(mac): 小游戏 2025-11-11 17:24:34 +08:00
uye
5771ede8a9 feat: mac 小游戏 2025-11-11 17:06:43 +08:00
萨拉托加
440d53e544 fix: 齐聚也干了
fix #14703
2025-11-10 22:20:06 +08:00
Constrat
dff100d338 chore: preload AD for Global (#14700)
---------

Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Manicsteiner <Manicsteiner@outlook.com>
2025-11-10 15:03:06 +01:00
萨拉托加
0b94d7464e fix: 肉鸽中取消选中状态可能会点到二倍速 2025-11-10 12:26:06 +08:00
uye
ef46443681 feat: 增加界园指挥分队存钱难度选择 tip 2025-11-10 12:08:03 +08:00
uye
8821df308b Release v5.27.3 (#14687) 2025-11-09 23:05:13 +08:00
status102
af81c25ba1 fix: 猪猪 2025-11-09 22:43:33 +08:00
pre-commit-ci[bot]
34843fab31 chore: Auto update by pre-commit hooks [skip changelog] 2025-11-09 14:41:21 +00:00
status102
d1736e5dd4 fix: Module base macOs 2025-11-09 22:38:39 +08:00
github-actions[bot]
6b4164e6eb docs: Auto Update Changelogs of v5.27.3 (#14688)
* docs: Auto Generate Changelog of Release v5.27.3

* docs: Update CHANGELOG for version 5.27.3

Updated CHANGELOG for version 5.27.3, highlighting new features, improvements, fixes, and documentation updates.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2025-11-09 22:31:42 +08:00
travellerse
2fb57d65df fix: 修复界园保留招募券在1080p下识别异常 (#14637)
* fix: 将colorWithClose设为false

* fix: 更换为没有文字的模板

* fix: 改回ClickSelf
2025-11-09 22:24:17 +08:00
萨拉托加
dce3780927 chore: 肉鸽添加凛御银灰圣聆初雪招募逻辑 2025-11-09 22:22:48 +08:00
pre-commit-ci[bot]
a0b1eaa804 chore: Auto update by pre-commit hooks [skip changelog] 2025-11-09 14:13:25 +00:00
status102
3bfa21ee02 feat: MaaCore 记录 Exception 时额外记录模块基址 2025-11-09 21:54:42 +08:00
uye
7c84863a20 fix: 提高干员部署滑动的最小时长,减少因模拟器丢帧导致的部署失败 2025-11-09 21:54:22 +08:00
Constrat
ac539eb343 fix: Exusiai Alter ocr regex for EN 2025-11-09 12:57:38 +01:00
MistEO
5e07116597 ci: 提供调试符号 (#14675) 2025-11-09 16:07:25 +08:00
github-actions[bot]
290261c50e chore: Auto Update Game Resources - 2025-11-08
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19190884721

[skip changelog]
2025-11-08 09:02:32 +00:00
uye
f1c28c7258 fix: 肉鸽刷开局期望奖励无法动态隐藏/显示 2025-11-08 15:43:30 +08:00
Constrat
74fd453a53 fix: Dorothy S2 ocr regex 2025-11-07 12:33:19 +01:00
status102
bfd9010ee2 feat: Wpf i18n字符串支持直接string.Frmat 2025-11-07 19:29:46 +08:00
github-actions[bot]
eb8c024202 chore: Auto Update Game Resources - 2025-11-07
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19162631273

[skip changelog]
2025-11-07 08:29:33 +00:00
status102
b2d0251b7e fix: Wpf增加悖论模拟模式非悖论作业检测 2025-11-07 13:37:56 +08:00
status102
5e85d2c793 perf: asst Log增加crash时额外输出core版本, build时间, 路径 2025-11-07 11:18:38 +08:00
MistEO
f54d012cb9 chore: add logs 2025-11-07 09:38:00 +08:00
MistEO
10179d1a0b perf: 更好的随机点分布 (#14652)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-07 09:33:53 +08:00
github-actions[bot]
43d88575c5 chore: Auto Templates Optimization
Triggered by 3fac78c0f9

[skip changelog]
2025-11-06 14:16:18 +00:00
uye
3fac78c0f9 perf: 优化切换主题逻辑 2025-11-06 22:15:48 +08:00
Lucien Shaw
88e27977e8 build(docs): update and switch to esm (#14642)
* build(docs): switch to esm

* build(docs): bump pnpm to v10.20.0

* ci: 精简文档站构建和发布流程

* build(docs): 升级部分依赖

* ci: 补全package.json的查找路径

* build(docs): 升级plume主题

* fix(docs): 适应新版本主题的样式变动

* ci: 补全文档站工作流的权限设置
2025-11-06 16:51:31 +08:00
uye
579def4704 feat: 怎么还有 GTII 2025-11-06 16:48:40 +08:00
uye
3233653381 fix: typo
[skip changelog]
2025-11-06 16:44:43 +08:00
uye
2a455c306a feat: 增加华硕 GTIII 显卡超频工具注入导致崩溃提示 2025-11-06 16:41:27 +08:00
萨拉托加
39c16790cd fix: 界园入暂亭ocrfix 2025-11-06 15:49:13 +08:00
MistEO
636ffff7b3 refactor: CropRoi -> ImageCropper (#14379) (#14647)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: SherkeyXD <57581480+SherkeyXD@users.noreply.github.com>
Co-authored-by: Lucien Shaw <myxlc55@outlook.com>
Co-authored-by: MistEO <18511905+MistEO@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 不留 <weinibuliu@outlook.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2025-11-06 15:32:35 +08:00
MistEO
61cdb47c00 ci: 更好的 CI 并发控制 (#14645) 2025-11-06 13:42:44 +08:00
Constrat
766c33c7b6 fix(tools): update to new data repo for sh script 2025-11-05 11:48:55 +01:00
Constrat
3bc0df7e4d fix(tools): update to new data repo for ps1 script 2025-11-05 11:48:47 +01:00
Constrat
dec2d2fef2 chore: remove expired token 2025-11-05 11:44:57 +01:00
Constrat
2ee56d2089 fix: move to public arkntools repo for txwy
Thanks to @Tsuk1ko
2025-11-05 11:44:38 +01:00
Constrat
16bf17e9b1 fix: update Sami floor regex
fix 14630 (hopeful)
2025-11-05 01:00:37 +01:00
github-actions[bot]
66d4e9b298 chore: Auto Update Game Resources - 2025-11-04
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19066618580

[skip changelog]
2025-11-04 11:08:37 +00:00
Status102
15a333fd39 rft: wpf拆分添加作业和作业集按钮 (#14624)
* rft: wpf拆分添加作业和作业集按钮

* i18n: 调整CopilotTip

* chore: 添加注释, 未来移除旧的右键行为

* perf: 统一图标格式

* perf: 统一文本描述

* chore: todo!

* feat: 调整描述

* feat: 调整悖论模拟列表启动要求描述

* i18n: KR tweak translation

* fix: typo

---------

Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
2025-11-04 16:30:46 +08:00
Status102
2c2b3c5b19 feat: 战斗列表启用时, 浏览单个作业时自动添加到战斗列表 (#14625) 2025-11-04 12:34:28 +08:00
uye
8eea7e49c5 perf: 优化切换主题流程 2025-11-03 22:48:17 +08:00
github-actions[bot]
bce6a6f259 chore: Auto Update Game Resources - 2025-11-03
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/19038089979

[skip changelog]
2025-11-03 14:32:04 +00:00
uye
676a470d2d fix: 给 mujica 擦屁股 2025-11-03 22:28:11 +08:00
Constrat
c7db6347f9 fix: move from Template to OcrDetect for BattleQuickFormationClear
Needed after yostar keeps changing that stupid button
2025-11-03 13:13:37 +01:00
status102
45528c282d perf: 空stack trace输出 2025-11-03 13:51:39 +08:00
uye
7b31ad3417 fix: 部分情况下 钼铅 识别错误 2025-11-03 13:11:19 +08:00
晓丶梦丶仁
9842cb962e fix: JP 1ns ocr 2025-11-03 11:54:32 +08:00
uye
4edf48b2e5 fix: OS 小游戏回合结束改用 ocr 2025-11-03 00:20:14 +08:00
uye
9d58a1c5be fix: 结束回合按钮怎么还会闪烁啊 2025-11-02 23:23:08 +08:00
MistEO
b73377eb6a refactor: use MaaUtils instead of Utils (#14579)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-02 23:19:38 +08:00
uye
2394480583 fix: 动画或卡顿导致概率无法使用无人机
fix #14620
2025-11-02 22:32:27 +08:00
uye
e09b984a15 Revert "fix: 增加从主页进入终端的延迟"
This reverts commit 6a09f44a09.
2025-11-02 18:44:44 +08:00
萨拉托加
6a09f44a09 fix: 增加从主页进入终端的延迟
fix #14617
2025-11-02 17:47:05 +08:00
uye
79f69ae511 Release v5.27.2 (#14605) 2025-11-02 16:57:02 +08:00
uye
defeedcd82 docs: Update CHANGELOG with recent fixes and features 2025-11-02 16:56:12 +08:00
uye
9b463e0a05 fix: fix: 技能点击范围会点到装备应变 (#14611) 2025-11-02 16:54:15 +08:00
萨拉托加
bda15f1074 fix: 技能点击范围会点到装备应变 (#14611) 2025-11-02 16:48:49 +08:00
github-actions[bot]
7d3d40ab37 chore: Auto Templates Optimization
Triggered by 59ed067254

[skip changelog]
2025-11-02 08:45:23 +00:00
pre-commit-ci[bot]
59ed067254 chore: Auto update by pre-commit hooks [skip changelog] 2025-11-02 08:44:24 +00:00
uye
3d6541d337 docs: Update CHANGELOG for version 5.27.2 2025-11-02 16:43:36 +08:00
uye
62c3dbd126 feat: OS-喀兰贸易研发部 小游戏 (#14615) 2025-11-02 16:41:26 +08:00
Constrat
866ed07d0c fix: Ines regex EN 2025-11-01 17:41:59 +01:00
萨拉托加
340a121528 fix: 肉鸽商店投资界面加一点延迟 2025-11-01 23:15:46 +08:00
github-actions[bot]
76b5c3380a docs: Auto Update Changelogs of v5.27.2 (#14606)
* docs: Auto Generate Changelog of Release v5.27.2

* docs: Update CHANGELOG for v5.27.2

Update CHANGELOG for version 5.27.2 with new features, improvements, and bug fixes.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2025-11-01 23:09:29 +08:00
uye
e40307f107 fix: 无法迁移就资源路径文件 2025-11-01 22:04:45 +08:00
uye
015dcbcc4f chore: SideStoryStage ocrReplace 2025-11-01 21:18:03 +08:00
Constrat
6b9612c356 fix: erosion resistant device regex fix for EN 2025-11-01 14:08:22 +01:00
MistEO
a0513fcfac Release v5.27.1 (#14598) 2025-11-01 19:06:22 +08:00
MistEO
79fce90bf8 ci: 算了你还是取消吧 2025-11-01 19:04:22 +08:00
MistEO
81793fc040 ci: fix cancel 2025-11-01 19:01:07 +08:00
MistEO
b3673409ac ci: dev do not auto cancel build 2025-11-01 18:54:31 +08:00
Hao Guan
2fa55fe15d fix(mac): 修复MaaUtils库位置 2025-11-01 18:48:30 +08:00
MistEO
a1141d2574 docs: v5.27.1 changelog 2025-11-01 18:47:11 +08:00
Hao Guan
6ba037ab4d fix(mac): GUI缺少MaaUtils库 2025-11-01 18:41:23 +08:00
SherkeyXD
011d953ffc feat: SideStory「雪山降临1101」导航 2025-11-01 18:15:43 +08:00
Copilot
cd88fd3c51 docs: fix boolean capitalization in C# documentation comments (#14599)
* Initial plan

* fix: correct boolean capitalization in C# doc comments

Co-authored-by: lucienshawls <82591976+lucienshawls@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lucienshawls <82591976+lucienshawls@users.noreply.github.com>
2025-11-01 18:06:35 +08:00
MistEO
08105aa96d fix: macos MaaXCFramework 2025-11-01 17:53:46 +08:00
HY
ba1fb36627 chore: 繁中服第十五章 & 重複訪問好友 text (#14594) 2025-11-01 17:51:23 +08:00
Lucien Shaw
b459e7149e build: bump MaaDeps to v2.10.1-maa.1 (#14596) 2025-11-01 17:51:00 +08:00
MistEO
d20030ae98 Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-01 17:50:27 +08:00
Lucien Shaw
0a566e4954 ci: 更新最新工作流的部分显示名称和部分代码注释中的表达 (#14597)
* ci: name change for submodule update workflows

* ci: if failed -> on failure

* docs: 代码注释中,succeeded与failed相对
2025-11-01 17:48:16 +08:00
MistEO
521dc3fc71 fix: xcframework typo 2025-11-01 17:46:52 +08:00
MistEO
a781c316d3 fix: macos xcframework 2025-11-01 17:39:57 +08:00
MistEO
ac01713331 ci: remove libMaaUtils.dylib headers 2025-11-01 17:38:10 +08:00
MistEO
70204e9047 build: try to fix macos package
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/14595
2025-11-01 17:37:06 +08:00
HX3N
48ace472a8 i18n: KR varius translations (#14591) 2025-11-01 09:50:31 +01:00
Lucien Shaw
0ae7f8878d chore: 调整devcontainer环境构建流程,使其适应MaaUtils (#14580)
1. devcontainer 创建时,更新并拉取子模块
2. 更改 MaaCore 下的 CMakeLists.txt,适应不知道哪里冒出来的 --no-allow-shlib-undefined 限制

* chore: devcontainer创建时更新子模块

* build: 尝试修复链接目标未定义的问题

* build: 将改动限于Linux
2025-11-01 16:05:00 +08:00
uye
cd1b4231ec chore: ClickStageName 同步 ClickedCorrectStage ocrReplace 2025-11-01 15:37:57 +08:00
uye
b63b4aa50e fix: 关卡复核错误 2025-11-01 15:05:18 +08:00
uye
bbc09712c0 Release v5.27.0 (#14581) 2025-11-01 14:44:34 +08:00
uye
9e028b6c97 docs: Fix formatting and grammar in CHANGELOG.md
Correct formatting and grammar in CHANGELOG entries.
2025-11-01 14:43:52 +08:00
github-actions[bot]
8fbe22396f chore: Auto Update Game Resources - 2025-11-01
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18991434628

[skip changelog]
2025-11-01 04:31:25 +00:00
github-actions[bot]
e9a8773fdf docs: Auto Update Changelogs of v5.27.0 (#14582)
Co-authored-by: MistEO <18511905+MistEO@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: AnnAngela <naganjue@vip.qq.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-11-01 10:22:26 +08:00
github-actions[bot]
f1c680c978 chore: Auto Templates Optimization
Triggered by 9b5419708a

[skip changelog]
2025-10-31 23:09:26 +00:00
github-actions[bot]
9b5419708a chore: Auto Update Game Resources - 2025-10-31
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18987286934

[skip changelog]
2025-10-31 23:09:02 +00:00
uye
8b9f851a39 fix: 亮色模式下无法显示 “坍缩范式列表” 2025-10-31 23:57:15 +08:00
Constrat
646691e47e i18n: various english translations 2025-10-31 14:06:44 +01:00
github-actions[bot]
cedd8f4d93 chore: Auto Update Game Resources - 2025-10-31
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18968441578

[skip changelog]
2025-10-31 09:31:19 +00:00
HX3N
eca68a0504 i18n: KR tweak MuMu12ExtrasEnabledTip 2025-10-31 18:14:11 +09:00
MistEO
4f9484c31a ci: add env for release-preparation 2025-10-31 16:53:43 +08:00
MistEO
91ea7067f7 refactor: 集成 MaaUtils (#14578)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-31 14:56:56 +08:00
SherkeyXD
ae300aa00d docs: 修正插件相关描述 2025-10-31 14:13:21 +08:00
github-actions[bot]
cc50b58ca2 chore: Auto Update Game Resources - 2025-10-30
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18946105155

[skip changelog]
2025-10-30 15:32:25 +00:00
github-actions[bot]
11d427786e chore: Auto Update Game Resources - 2025-10-30
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18933497361

[skip changelog]
2025-10-30 07:45:10 +00:00
MistEO
02edf491c5 docs: Sync documents in all languages, Powered by AI (#14572)
Co-authored-by: MistEO <18511905+MistEO@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Manicsteiner <Manicsteiner@outlook.com>
2025-10-29 23:49:12 +08:00
Lucien Shaw
0f9dd867a9 ci: 补全子模块更新工作流的显示名称 2025-10-29 16:16:07 +08:00
MistEO
4159c07437 ci: perf commit log 2025-10-29 16:00:33 +08:00
MistEO
2fe6583328 Merge branch 'dev' of https://github.com/MaaAssistantArknights/MaaAssistantArknights into dev 2025-10-29 15:54:46 +08:00
MistEO
dbfea1e38a ci: update submodules for release PR, and rename gen-changelog -> release-preparation 2025-10-29 15:54:41 +08:00
github-actions[bot]
8ed6accb45 feat: Update Submodules MaaMacGui, maa-cli 2025-10-29 07:46:41 +00:00
MistEO
c9aa40f4ee ci: fix update submodules 2025-10-29 15:45:37 +08:00
MistEO
576904acc1 ci: update submodules 2025-10-29 15:42:10 +08:00
Status102
f9366249e1 feat: 记录crash log时同时记录stacktrace, 并允许 ASST_DEBUG 在 debug 目录下生成 crash.log (#14526)
* feat: 记录crash log时同时记录stacktrace, 并允许 ASST_DEBUG 在 debug 目录下生成 crash.log

* fix: 加个循环次数限制

* perf: 简单整理
2025-10-29 02:36:46 +08:00
Status102
cd0d075d8d feat: LogInfo 等宏支持is_enabled (#14551)
feat: LogInfo 等宏支持is_enable
2025-10-29 02:02:10 +08:00
uye
7332589d04 Release v5.27.0-beta.2 (#14556) 2025-10-29 01:27:33 +08:00
uye
0101fde3c0 docs: Update CHANGELOG with new fix entry
[skip changelog]
2025-10-29 01:27:11 +08:00
uye
8c7c47251a fix: 无法加载 cache 资源
fix #14451
2025-10-29 01:05:05 +08:00
github-actions[bot]
d874df3c2c docs: Auto Update Changelogs of v5.27.0-beta.2 (#14567)
* docs: Auto Generate Changelog of Release v5.27.0-beta.2

* docs: Update CHANGELOG for v5.27.0-beta.2

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2025-10-29 00:50:07 +08:00
Weiyou Wang
5b33ff3ab6 fix: 改用 CustomeSkip 来跳过新时装动画 (#14566)
* feat: 改用 CostumeSkip 来跳过新时装动画

* fix: 删除 SS@Store@Purchase@NextAfterMerelyWaiting,任务 GetCloth 改名为 WearCostume

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-29 00:43:45 +08:00
github-actions[bot]
f5c6c96184 chore: Auto Update Game Resources - 2025-10-28
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18875534231

[skip changelog]
2025-10-28 12:59:11 +00:00
萨拉托加
7e35a6499c Revert "chore: 同心暂时去掉5选项"
This reverts commit cb9bc0f87f.
2025-10-28 20:48:20 +08:00
Weiyou Wang
529ca6a7fc feat: 界园肉鸽不期而遇实现选项识别 (#14540)
* feat: RoguelikeEncounterOptionAnalyzer

* feat: 界园肉鸽实验性功能 -- 识别选项数量后调整选项

* chore: Auto update by pre-commit hooks [skip changelog]

* refactor: 跳过不可用选项

* refactor: 设置初次滑动

* refactor: 给 save_img 日志加点描述

* feat: 加个 get_img 接口,以便于获得合成图

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 不是你怎么没有 formatter 啊?

* refactor: 把分析数据存储在插件成员变量内,为未来重构打基础

* refactor: 把不期而遇选项识别结果输出移到插件中,加入 callback

* feat: 无法识别选项文字时保存图片

* refactor: 给 save_img 日志加点描述

* refactor: int -> size_t

* refactor: choose -> select

* refactor: sort functions

refacor: sort functions

* refactor: 用 option_analyzed 来判断是否已经识别过不期而遇选项

* fix: 去掉不必要的参数 theme

* refactor: 给 OCR 配置任务加点东西(大概率没什么用吧)

* refactor: 去掉内部接口中的冗余 sanity check

* feat: 加入 view 控制

* fix: 忘了 callback 不能用 const

* feat: 处理一下 edge case

* feat: 来点 WpfGui Log

* fix: typo

* fix: 一些漏网之鱼

* fix: 再调整下滑动距离

* fix: 什么乱七八糟的

* fix: 什么乱七八糟的

* fix: 方向错了,加点 Log

* fix: 修正长图识别 roi

* fix: 再调整一下 roi

* fix: 所以说不建议再睡眠不好的时候糊屎

* fix: 对不可选选项的模版进行二值化后再 OCR

* fix: 好像得考虑一下通道

* fix: 删掉无用参数

* refactor: 再整理一下代码,减少冗余

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 再缩小点 roi

* fix: 加点延迟

* fix: clang-tidy 说这样写

* feat: 把 debug 截图加回来,收工

* docs: 给任务链加点注释

* docs: 给 RoguelikeEncounterOptionAnalyzer 加点注释

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-28 20:46:06 +08:00
Lucien Shaw
3a75653fbb docs: 更正文档编写指南的一处typo 2025-10-28 20:32:38 +08:00
Lucien Shaw
655ab65682 docs: 对codespace相关链接进行小修小补 (#14564)
* docs: add links for home page of codespaces

* docs: 去除codespace徽章链接里意义不明的color参数
2025-10-28 20:07:41 +08:00
Weiyou Wang
bffbe8d633 fix: 调换使用错误的排序函数 (#14555) 2025-10-28 20:02:34 +08:00
dependabot[bot]
1dcf2a42a7 ci: bump the github-actions group in /.github/workflows with 2 updates (#14553)
Bumps the github-actions group in /.github/workflows with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/upload-artifact` from 4 to 5
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

Updates `actions/download-artifact` from 5 to 6
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-28 11:32:20 +01:00
Lucien Shaw
846d76f137 docs: 接入DeepWiki (#14563)
* docs: 使用DeepWiki徽章和链接

* docs: 开发文档中加入deepwiki的指引

* docs: fix typo
2025-10-28 18:27:19 +08:00
Weiyou Wang
1ea6833ffe fix: 给生息演算点击 "开始行动" 的任务加点延迟,防止错过确认弹窗 2025-10-28 21:17:32 +11:00
MistEO
5e097de000 docs: 全语言开发文档章节整理 (#14562)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-28 16:00:58 +08:00
uye
8a45b1717e fix: 猪玛写 switch 不写 break 2025-10-28 15:54:12 +08:00
MistEO
fad876527a docs: 把codespace移到犄角旮旯 (#14560)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-28 15:28:29 +08:00
uye
5b7fe1c7e9 chore: 调整雷电截图增强提示,强制要求模拟器分辨率为横屏模式 2025-10-28 15:21:08 +08:00
uye
6ee884772b chore: 调整连接失败尝试启动模拟器的描述 2025-10-28 15:12:57 +08:00
uye
69ea005af3 perf: 主线导航目标关卡默认在屏幕内时不再划到最右边后往前寻找 2025-10-28 15:12:57 +08:00
Lucien Shaw
7caca829a1 chore: 移除devcontainer轻量环境的部分非必要依赖 (#14499)
对 devcontainer 的改动如下:
1. 在轻量环境中,
   - 移除 `python` 及其相关格式化扩展 `black` 和 `isort`
   - 移除 `black` 和 `isort` 等 pip 包
2. 在所有环境中,
   - 将 VS Code 的默认主题设置为 `Default Dark Modern`

* chore: 移除devcontainer轻量环境的部分非必要依赖

* chore: 将编辑器默认颜色主题调整为暗色

* chore: 将空白环境的post-create脚本独立,与其它环境一致

* chore: 把maa扩展加回来
2025-10-28 11:58:09 +08:00
萨拉托加
d59144c549 chore: 重复访问好友添加Ocr兜底 2025-10-28 10:02:03 +08:00
Weiyou Wang
2b245d291d fix: 界园肉鸽放弃探索改用纯色匹配 (#14532)
* fix: 界园肉鸽放弃探索改用普通模版匹配

chore: Auto update by pre-commit hooks [skip changelog]

* fix: 换用 HSV + pureColor

* refactor: 模版也用同样的 color scales 处理一下

* chore: Auto update by pre-commit hooks [skip changelog]

* refactor: 进一步修正 HSV 范围

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-28 01:42:00 +08:00
uye
a1e1df535a feat: 增加纯数色匹配 (#14536)
* feat: 增加纯数色匹配

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: 更新 schema

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-28 01:41:25 +08:00
github-actions[bot]
bdb49d8395 chore: Auto Templates Optimization
Triggered by a3523789d1

[skip changelog]
2025-10-27 15:44:45 +00:00
uye
a3523789d1 feat: 添加主线 16 章导航 2025-10-27 23:44:19 +08:00
github-actions[bot]
39aca97640 chore: Auto Update Game Resources - 2025-10-27
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18846503435

[skip changelog]
2025-10-27 15:30:28 +00:00
uye
04e454b3e0 feat: 支持生息演算与肉鸽遇到不认识的主题时自动切换 2025-10-27 23:24:52 +08:00
uye
4190e3c421 feat: 添加 生活队凹开局密文板 与 坍缩范式列表 TooltipBlock 2025-10-27 23:00:36 +08:00
萨拉托加
f19d49bf95 fix: 齐聚主题无法导航肉鸽和生息演算 2025-10-27 22:35:15 +08:00
uye
559ea25856 feat: core 异常退出 ui 添加日志记录 2025-10-27 18:27:52 +08:00
Constrat
88b6ceb4d0 fix: ocr for Executor the Ex Foedere for EN 2025-10-27 11:25:50 +01:00
uye
b126016538 fix: ja-jp 泰拉大陆调查团 识别错误
fix #14547
2025-10-27 16:01:27 +08:00
SherkeyXD
06454db032 chore: 添加 png 后缀 2025-10-27 15:30:13 +08:00
Weiyou Wang
1d11f4c1a4 chore: WpfGui 增加对界园肉鸽 DLC 1 三个新分队的支持 2025-10-27 14:55:00 +08:00
Weiyou Wang
a17e997e38 refactor: polish PixelAnalyzer a bit (#14538) 2025-10-27 00:12:47 +11:00
status102
df7207dfb0 chore: 增加wpf项目cmake build脚本 2025-10-26 02:17:55 +08:00
AnnAngela
a05a141fea chore: 更新 Windows 模拟器文档,调整支持列表并添加详细说明 (#14534) 2025-10-25 22:48:46 +08:00
github-actions[bot]
4e52dba787 chore: Auto Templates Optimization
Triggered by dc0751b1e2

[skip changelog]
2025-10-25 14:07:57 +00:00
github-actions[bot]
dc0751b1e2 chore: Auto Update Game Resources - 2025-10-25
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18804107643

[skip changelog]
2025-10-25 14:07:23 +00:00
uye
2b179c673c chore: ui 日志增加 adb devices 输出 2025-10-24 23:11:40 +08:00
uye
e48cb49e4a chore: 基建降低会清空其他干员效率的技能优先级
fix #14524
2025-10-24 22:51:31 +08:00
github-actions[bot]
7f7b124bc7 chore: Auto Update Game Resources - 2025-10-24
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18781459022

[skip changelog]
2025-10-24 13:38:14 +00:00
uye
2c656db087 Release v5.27.0-beta.1 (#14502) 2025-10-24 00:24:44 +08:00
SherkeyXD
63420e9808 docs: 优化文档代码的高亮主题 2025-10-23 23:24:47 +08:00
github-actions[bot]
d8207fb5b5 docs: Auto Update Changelogs of v5.27.0-beta.1 (#14523)
* docs: Auto Generate Changelog of Release v5.27.0-beta.1

* docs: Fix formatting and update entries in CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2025-10-23 23:19:40 +08:00
萨拉托加
cb9bc0f87f chore: 同心暂时去掉5选项 2025-10-23 23:04:04 +08:00
Weiyou Wang
f863a6f4b6 fix: 降低萨米肉鸽进入 “诡秘的预感” 所需模版匹配分数阈值 (#14521) 2025-10-23 22:46:10 +08:00
萨拉托加
2651b1bc01 fix: 公招按钮roi错误
fix #14514
2025-10-23 12:12:32 +08:00
晓丶梦丶仁
99b4e75567 fix: JP Task.png (#14516)
* fix: JP Task.png
2025-10-23 12:10:31 +08:00
Weiyou Wang
904a8f3d4c fix: 掉落识别修复 (#14508) 2025-10-23 01:15:22 +08:00
github-actions[bot]
7c710fcee5 chore: Auto Templates Optimization
Triggered by a6a3451217

[skip changelog]
2025-10-22 16:06:15 +00:00
pre-commit-ci[bot]
a6a3451217 chore: Auto update by pre-commit hooks [skip changelog] 2025-10-22 16:05:45 +00:00
pre-commit-ci[bot]
93a0e2d4a1 chore: Auto update by pre-commit hooks [skip changelog] 2025-10-23 00:03:17 +08:00
SherkeyXD
7f6622e51d feat: 界面主题「齐聚」 2025-10-23 00:03:17 +08:00
SherkeyXD
0b533468d1 chore: GetImageFromRoi 工具优化 2025-10-23 00:03:17 +08:00
Constrat
6d26ccace1 chore: remove global templates for 3294b29f54 2025-10-22 17:03:58 +02:00
HY
c101f9cea6 chore: txwy add SwitchTheme@ConfirmThemeChange.png (#14511)
* chore: txwy add SwitchTheme@ConfirmThemeChange.png

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-22 16:29:46 +02:00
github-actions[bot]
f5921c7293 chore: Auto Update Game Resources - 2025-10-22
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18715072426

[skip changelog]
2025-10-22 11:45:27 +00:00
Weiyou Wang
880bdea7d3 refactor: 将 Copilot ActionType::ResetTimer 更改为更适合的 ResetStopwatch (#14507)
* refactor: 为 ActionType::ResetTimer 加入中文变种

* refactor: Timer -> Stopwatch
2025-10-22 22:20:50 +11:00
Weiyou Wang
9c53ea10c6 docs: 补充模拟器相关文档和协议文档 (#14478)
* docs: 为 #13913 跳过使用未准备好的技能 && 全局计时器补充作业协议文档

* docs: MuMu 模拟器显存使用策略警告。

* docs: 删除冗余的蓝叠模拟器 faq

* docs: 补充外服 CopilotTask 文档

* docs: 改改

* docs: timer -> stopwatch

docs: 繁体中文文档里的指令简体化 —— 我们并不支持繁体指令啊

---------

Co-authored-by: Rbqwow <55343783+Rbqwow@users.noreply.github.com>
2025-10-22 21:49:20 +11:00
uye
9ea6057145 fix: 变更弃用的参数 2025-10-22 17:04:51 +08:00
uye
05b377981a fix: 开始唤醒会回到主界面 2025-10-22 16:49:38 +08:00
github-actions[bot]
465c2bcf62 chore: Auto Templates Optimization
Triggered by 3294b29f54

[skip changelog]
2025-10-22 08:44:58 +00:00
uye
3294b29f54 chore: 调整截图 2025-10-22 16:44:25 +08:00
uye
f967903a4b feat: 资源更新完成后等待空闲时再加载
fix: #14500
2025-10-22 16:35:51 +08:00
萨拉托加
7622cff5b4 feat: 界园DLC新关卡战斗逻辑 2025-10-22 15:34:53 +08:00
github-actions[bot]
4e36c78691 chore: Auto Templates Optimization
Triggered by afb0f8f647

[skip changelog]
2025-10-22 07:15:00 +00:00
uye
afb0f8f647 chore: 文件路径错误 2025-10-22 15:14:22 +08:00
Weiyou Wang
35e437d372 fix: 尝试为活动商店小游戏适配新的时装购买动画 (#14490)
* fix: 尝试为活动商店小游戏适配新的时装购买动画

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-22 15:00:52 +08:00
Initial-heart
3d9732a930 docs: 添加关于实体设备上账号切换问题的说明 (#14468)
* docs: 加一段关于实体设备上账号切换问题的说明

rt

* docs: 调整措辞和格式

* docs: 修正措辞

* docs: ko-kr

* i18n: en-us translation

* i18n: ja-jp translation

* docs: zh-tw

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: Lucien Shaw <myxlc55@outlook.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: Manicsteiner <Manicsteiner@outlook.com>
Co-authored-by: momomochi987 <as99us301@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-22 09:15:39 +08:00
github-actions[bot]
d12588f62b chore: Auto Templates Optimization
Triggered by e3d48ae65d

[skip changelog]
2025-10-22 00:47:15 +00:00
Manicsteiner
e3d48ae65d chore: YostarJP SwitchTheme@ConfirmThemeChang 2025-10-22 08:46:15 +08:00
HX3N
2a2e360f3e chore: YostarKR add SwitchTheme@ConfirmThemeChang
ref 979e0c4b1b
2025-10-22 08:46:54 +09:00
Constrat
df5af18b93 fix: precommit maacore 2025-10-21 21:02:23 +02:00
Constrat
55b3cdafaa chore: add SwitchTheme@ConfirmThemeChange.png 2025-10-21 21:02:13 +02:00
github-actions[bot]
538760dbbe chore: Auto Templates Optimization
Triggered by 979e0c4b1b

[skip changelog]
2025-10-21 18:29:00 +00:00
uye
979e0c4b1b feat: 不是我认识的主题,直接切换 2025-10-22 02:28:17 +08:00
github-actions[bot]
d9eb1e50d9 chore: Auto Update Game Resources - 2025-10-21
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18689594250

[skip changelog]
2025-10-21 15:46:43 +00:00
Constrat
7e9f862f62 test: remove cancelled() and add mentions 2025-10-21 15:31:56 +02:00
Constrat
20c86b0fff fix: change default issue + remove always as not necessary 2025-10-21 15:31:06 +02:00
Constrat
072a98dd41 fix: add always() 2025-10-21 15:26:20 +02:00
Constrat
a053e6547d ci: test using a single issue by adding comments and hiding previous comments 2025-10-21 15:23:17 +02:00
Constrat
bfcb02104c ci: increase sleep delay for resource updater 2025-10-21 14:42:01 +02:00
Lucien Shaw
1e9ae031ea ci: refine display names for existing workflows (#14419)
---------

Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-10-21 14:37:49 +02:00
github-actions[bot]
d70d939947 chore: Auto Templates Optimization
Triggered by 37ad3a2f35

[skip changelog]
2025-10-21 09:10:28 +00:00
github-actions[bot]
37ad3a2f35 chore: Auto Update Game Resources - 2025-10-21
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18678814343

[skip changelog]
2025-10-21 09:09:47 +00:00
github-actions[bot]
7d233513ff chore: Auto Update Game Resources - 2025-10-21
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18676270061

[skip changelog]
2025-10-21 07:29:13 +00:00
Goat Boring(山羊博宁88)
b93d39b77e docs: 在不支持列表中添加腾讯应用宝 (#14477)
* docs: Add Tencent App Treasure note in notSupport list

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-21 10:49:00 +08:00
Constrat
c91c1ff279 style: run prettier as there's missing stuff apparently 2025-10-20 21:30:13 +02:00
status102
d7524a4f9e perf: 进入新任务后重置任务超时计时器, 以避免非单任务卡阻的误报 2025-10-21 03:00:35 +08:00
status102
fff05d45b5 perf: ProcSubTask static 2025-10-21 02:36:49 +08:00
SherkeyXD
201c856594 chore: 我是铸币 2025-10-21 00:12:33 +08:00
SherkeyXD
97756b1200 feat: 界园 dlc2 通宝数据更新 2025-10-20 23:48:16 +08:00
uye
79bea9b98d fix: 无人机协助点击无效时增加自动重试机制
fix #13327
2025-10-20 23:37:52 +08:00
dependabot[bot]
f94a79a1a3 ci: bump actions/setup-node from 5 to 6 in /.github/workflows in the github-actions group (#14475)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 23:30:34 +08:00
Status102
eb90a19e8b docs: 增加换行以提升文档在GitHub的阅读体验 (#14338) 2025-10-20 23:27:04 +08:00
SherkeyXD
957b486c53 fix: 每日任务领取延迟载荷移位 2025-10-20 23:20:37 +08:00
SherkeyXD
87a892ad7a fix: 每日任务领取因为延迟卡住 2025-10-20 23:16:00 +08:00
SherkeyXD
363c4dbb47 docs: vscode插件文档视觉优化 2025-10-20 22:32:59 +08:00
SherkeyXD
b639fd3a62 docs: 利用tabs优化视觉表现-part2 2025-10-20 22:32:58 +08:00
SherkeyXD
8bbd104ea6 docs: 利用tabs优化视觉表现 2025-10-20 22:32:58 +08:00
uye
b63bd4b6eb feat: 支持剿灭关卡名识别 2025-10-20 22:27:26 +08:00
SherkeyXD
7264f26b14 docs: 利用步骤容器优化视觉效果-part2 2025-10-20 21:50:56 +08:00
SherkeyXD
e3be737a3c docs: 利用步骤容器优化视觉效果 2025-10-20 21:45:29 +08:00
SherkeyXD
e5a823d476 docs: 更新algolia配置 2025-10-20 21:27:43 +08:00
uye
25513ab692 chore: ALL~ the Announcements 中新公告标题中加 * 2025-10-20 21:26:10 +08:00
HY
26acc07463 fix: 繁中服無法進入資源收藏關卡 (#14469) 2025-10-20 10:23:43 +08:00
Constrat
38a801a8c1 i18n: translate ElapsedTime
ref: 1edd006982
2025-10-20 01:16:31 +02:00
Weiyou Wang
1edd006982 feat: 跳过使用未准备好的技能 && 全局计时器 (#13913)
* feat: skip_if_not_ready

* feat: elapsed_time

* feat: WpfGui log 输出计时器信息

* chore: Auto update by pre-commit hooks [skip changelog]

* feat: 不默认启用全局计时器

* refactor: 支持 ResetTimer 拼写变种

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-20 01:35:37 +11:00
Weiyou Wang
45025dd168 fix: 为界园放弃探索任务添加备用模版 (#14466)
* fix: add alternative template for JieGarden@Roguelike@Abandon

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-19 23:19:59 +11:00
github-actions[bot]
3b10c1518a chore: Auto Update Game Resources - 2025-10-19
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18630203409

[skip changelog]
2025-10-19 12:12:03 +00:00
Weiyou Wang
5efdab7fbf fix: 肉鸽跳一战打一战刷钱 (#14450)
* refactor: 在 RoguelikeConfig 中加入 skip_recruit_in_fast_pass flag,用于判断是否在特定情况下跳过招募

* refactor: refine 一下 RoguelikeRecruit-GiveUp 任务

* refactor: 重命名 RoutingStrategy

* feat: 一战快速投资/烧水

* refactor: 合并冗余 Roguelike@RoutingConfig 任务,重命名为 RoguelikeRouting-Config

* refactor: 统一 RoguelikeRoutingAction 命名

* refactor: 统一导航插件任务命名

* refactor: 这些任务不需要用 RoguelileRoutingAction

* fix: 重命名相关模版

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 漏网之鱼

* refactor: MapNode 模版搬家

* refactor: 岁兽残识导航相关任务搬家

* refactor: 改改任务名

* refactor: 模版改名 Roguelike@MapNodeX -> RoguelikeMapNode-X

* refactor: 换一个似乎更简单的写法

* fix: 忘了外服了

* refactor: 漏了这个

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 修修

* fix: 继续修修

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-19 22:49:08 +11:00
uye
930de73324 feat: 本次更新的公告右上角添加红点 2025-10-18 23:22:58 +08:00
萨拉托加
527ebee6af fix: 傀影不期而遇选项 2025-10-18 20:27:50 +08:00
github-actions[bot]
c24baee8ff chore: Auto Update Game Resources - 2025-10-18
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18613855248

[skip changelog]
2025-10-18 09:28:09 +00:00
Weiyou Wang
11f9d6e0a4 refactor: 拆出界园岁兽残识地图导航 (#14432)
* refactor: 舍弃 AbstractRoguelikeMap,拆到 RoguelikeMapConfig 与 RoguelikeBoskyPassageMap

* refactor: 拆出界园岁兽残识地图导航
2025-10-18 20:15:36 +11:00
Weiyou Wang
6733f49d8b fix: 界园 dlc 背景无法放弃探索 (#14425)
* fix: refine template for JieGarden@Roguelike@Abandon

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-18 15:27:27 +08:00
萨拉托加
e7f909c807 fix: 界园狭路相逢选项 2025-10-18 10:39:36 +08:00
HX3N
147cf766c1 fix: YostarKR RoguelikeCustom-HijackSquad squad recognition 2025-10-18 00:37:52 +09:00
HY
b9edba6cf5 chore: 繁中服主線、肉鴿導航 UI 更新 (#14433)
* chore: 繁中服主線、肉鴿導航 UI 更新

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: sarkaz DLC

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-17 22:43:27 +08:00
HY
39326e177b chore: 繁中服「輓歌燃燒殆盡」活動導航 (#14434)
* chore: 繁中服「輓歌燃燒殆盡」活動導航

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-17 22:42:22 +08:00
萨拉托加
e6cfa25f81 fix: Award模板阈值还是小了
fix #14431
2025-10-17 19:53:26 +08:00
MistEO
2c247bbeda fix: 掉落识别增加越界检查 (#14312)
Co-authored-by: Weiyou Wang <44151844+Alan-Charred@users.noreply.github.com>
2025-10-17 16:08:54 +08:00
萨拉托加
af69b6172c fix: 界园杂疑选项 2025-10-17 14:22:55 +08:00
github-actions[bot]
5626880d19 chore: Auto Update Game Resources - 2025-10-17
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18584128794

[skip changelog]
2025-10-17 06:11:57 +00:00
Jim-Happy
445ce5352f fix: 修复 "设置-外部通知" 存在多个通知渠道时只会发送到第一个成功的渠道问题 (#14380)
* feat: 添加选项:发送到所有通知渠道

* style: 删除调试注释

* refactor(settings): 删除原PR逻辑,改为修复通知驱动只通知一个的bug

删除原PR逻辑,改为修复通知驱动只通知一个的bug
2025-10-17 13:55:29 +08:00
travellerse
dce6fbfbce feat: 添加刷常乐节点策略 (#13868)
* feat: 支持识别常乐节点的子类型

* perf: 将树洞节点优先级拆到配置里

* refactor: 将界园树洞策略从通用Routing策略中分离出来

* feat: 初步实现刷常乐节点

* feat: 为刷常乐节点功能添加UI

* refactor: 重命名节点类型获取函数

* perf: 优化节点类型的日志输出

* feat: 添加发现目标常乐节点后退出

* i18n: CN常乐节点显示文本

* fix: 修复type2name映射初始化潜在问题

* perf: 添加目标子类型的设置和获取方法

* refactor: 优化优先级节点类型解析逻辑

* feat: 刷常乐节点策略下保存路上的招募券

* i18n: 为其它语言提供占位

* perf: 将新增的本地化键值放到一起

* chore: 调整日志输出中的空格

* perf: 仅在非开局招募时保存招募券

* perf: 保留招募券到达上限时正常招募

* fix: 修复gui日志输出没有使用本地化

* fix: 给界园树洞节点点击加上200ms的前置延时

* perf: 在 RoguelikeRoutingTaskPlugin 中添加运行模式以区分普通地图与界园树洞

* refactor: 优化RoguelikeBoskyPassageMap的单例使用

* feat: 添加界园树洞节点类型wpf输出及其颜色配置

* fix: 不在每次开始肉鸽重置m_target_subtype
2025-10-17 16:54:30 +11:00
github-actions[bot]
724130da50 chore: Auto Update Game Resources - 2025-10-17
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18583431830

[skip changelog]
2025-10-17 05:29:46 +00:00
萨拉托加
12315868c7 fix: 界园肉鸽选项 2025-10-17 13:08:00 +08:00
萨拉托加
230b3b9169 fix: 给ClickToStartPoint加点延迟
fix #14421
2025-10-17 12:51:01 +08:00
github-actions[bot]
3c61b10de5 chore: Auto Update Game Resources - 2025-10-17
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18582491372

[skip changelog]
2025-10-17 04:31:47 +00:00
萨拉托加
5456428eb7 fix: 萨卡兹去伪存真弹窗有延迟无法退出 2025-10-17 12:21:06 +08:00
github-actions[bot]
1ca780ef0d chore: Auto Update Game Resources - 2025-10-17
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18581606017

[skip changelog]
2025-10-17 03:35:51 +00:00
HX3N
8f3ff813a1 chore: YostarKR SSS#8 SSSBuffChoose 2025-10-17 11:38:29 +09:00
Constrat
a4688ebeed chore: update SSS#8 buff choose ocr for EN 2025-10-16 22:08:30 +02:00
Constrat
7d028cdbd5 chore: SSS#8 global changes (add acahuallan, remove dossoles and barrenbeasts) 2025-10-16 22:03:28 +02:00
Constrat
ef187657ba fix: cleanup ifdef + fix AsstDestroy missed calls + lldb 2025-10-16 21:49:14 +02:00
Constrat
403f3c5644 Release v5.26.2 (#14399) 2025-10-16 20:08:32 +02:00
不留
369add1890 ci: 为 CodeQL 相关工作流添加仓库所有者检查 (#14413)
* ci: 为 CodeQL 相关工作流添加仓库所有者检查

* ci: 为 CodeQL 相关工作流添加仓库所有者检查
2025-10-16 20:04:23 +02:00
github-actions[bot]
0ae21436c8 chore: Auto Templates Optimization
Triggered by a322706241

[skip changelog]
2025-10-16 14:38:37 +00:00
pre-commit-ci[bot]
a322706241 chore: Auto update by pre-commit hooks [skip changelog] 2025-10-16 14:38:00 +00:00
Constrat
ec2b92002b fix: Fix contro center mini for EN 2025-10-16 16:34:34 +02:00
晓丶梦丶仁
36dd631606 fix: MiniGame Value 重复 2025-10-16 17:10:48 +08:00
github-actions[bot]
a201b3da65 chore: Auto Update Game Resources - 2025-10-16
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18556208810

[skip changelog]
2025-10-16 09:09:46 +00:00
晓丶梦丶仁
7421100998 fix: JP GreenGrass 2025-10-16 16:44:19 +08:00
萨拉托加
e98ff0ee35 fix: 萨米肉鸽深入探索触发暂时撤退会卡住 (#14275)
* fix: 萨米肉鸽深入探索触发暂时撤退会卡住

不知道MissionFailedFlag原来的next有什么用,暂时撤退的话感觉next个MissionCompletedFlag就够了

* chore: 加点延迟
2025-10-16 15:50:32 +08:00
Lucien Shaw
d7acdfda36 docs: 为文档站字符画组件更换缩放方法和添加主题切换支持 (#14387)
* docs: 文档站字符画组件的大小调整改用transform: scale

* docs: 字符画适应窗口垂直高度

* chore: 我们精简了字符画,这样你才知道这是字符画

* fix: 调整字符画尺寸前先判断分母是否为0

* refactor: 字符画组件卸载时一并移除窗体resize事件监听

* feat: 切换主题时保留当前随机到的字符画名称

* style: prettier fix
2025-10-16 15:37:39 +08:00
github-actions[bot]
6dfffdc45b chore: Auto Templates Optimization
Triggered by 6834ee1abe

[skip changelog]
2025-10-16 04:34:13 +00:00
HX3N
6834ee1abe fix: YostarKR update Infrast Mini tempalte 2025-10-16 13:28:54 +09:00
Manicsteiner
a571e974b6 chore: YostarJP RecruitingActivities 2025-10-16 08:58:16 +08:00
github-actions[bot]
2440f365c9 docs: Auto Update Changelogs of v5.26.2 (#14400)
* docs: Auto Generate Changelog of Release v5.26.2

* i18n: simple highlight for global

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-10-15 18:40:15 +02:00
Constrat
f182d36014 fix: RecruitingActivities EN 2025-10-15 16:18:03 +02:00
github-actions[bot]
cd6a3efc4e chore: Auto Update Game Resources - 2025-10-15
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18530257413

[skip changelog]
2025-10-15 13:19:46 +00:00
Manicsteiner
3ee20cee2e chore: YostarJP ocr update (#14402) 2025-10-15 11:01:05 +02:00
HX3N
d9aa14333e fix: KR update RecruitingActivities ocr text 2025-10-15 09:44:28 +09:00
github-actions[bot]
a1cc9df6bd chore: Auto Templates Optimization
Triggered by 9313a606f2

[skip changelog]
2025-10-15 00:10:10 +00:00
HX3N
9313a606f2 fix: BattleQuickFormation KR 2025-10-15 09:05:25 +09:00
github-actions[bot]
3c6c7624dd chore: Auto Templates Optimization
Triggered by 0e00b05128

[skip changelog]
2025-10-14 21:47:56 +00:00
Constrat
0e00b05128 fix: ReceptionMini for EN 2025-10-14 23:47:35 +02:00
Constrat
fbf8b5636d chore: revert temp fix 715c2c13b5 for EN / JP and KR
@momomochi987this will likely happen to txwy... Try to remember?
2025-10-14 23:26:08 +02:00
Constrat
c535cbdf6d fix: Various store OCR for EN IS 2025-10-14 23:20:56 +02:00
Constrat
a872c08a32 fix: MT minigame EN 2025-10-14 23:20:32 +02:00
Manicsteiner
ff457fbd21 chore: Enable phantom roguelike difficulty for Yostar servers (#14332)
* chore: enable phantom roguelike difficulty for Yostar servers

* chore: JP translate
2025-10-14 23:10:01 +02:00
Constrat
b4fcf37b35 i18n: update MT mini event EN 2025-10-14 23:09:04 +02:00
github-actions[bot]
b5ba39174d chore: Auto Templates Optimization
Triggered by 319ee8876a

[skip changelog]
2025-10-14 21:05:58 +00:00
Constrat
319ee8876a fix: operbox, battlequick, infrast expand role EN 2025-10-14 23:05:33 +02:00
Constrat
2a8b0f7f01 fix: Exusiai and Hoshiguma prepare for alters 2025-10-14 20:25:59 +02:00
Constrat
a7dc1f791f fix: increase ROI for Orundum and SpecialAccess 2025-10-14 20:04:16 +02:00
HX3N
16a160f3a5 chore: YostarKR MT ocr edit (#14398)
* chore: YostarKR MT ocr edit

* chore: IS1 dlc
2025-10-14 19:58:54 +02:00
Constrat
7676b7235b fix: OrundumActivities MT event for EN 2025-10-14 17:13:18 +02:00
github-actions[bot]
e100cc68e2 chore: Auto Update Game Resources - 2025-10-14
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18496105506

[skip changelog]
2025-10-14 12:14:33 +00:00
github-actions[bot]
5923efe988 chore: Auto Update Game Resources - 2025-10-14
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18494958090

[skip changelog]
2025-10-14 11:27:27 +00:00
HX3N
6b91bd8106 chore: YostarKR MiniGame (#14395)
* chore: YostarKR MiniGame

* chore: fix typo
2025-10-14 11:50:38 +02:00
github-actions[bot]
24df42e14a chore: Auto Update Game Resources - 2025-10-14
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18484871142

[skip changelog]
2025-10-14 03:49:09 +00:00
Manicsteiner
6fc5800e02 chore: YostarJP update VisitNext (#14390) 2025-10-13 16:17:00 +02:00
dependabot[bot]
eb91fc34a6 ci: bump the github-actions group in /.github/workflows with 2 updates (#14391)
Bumps the github-actions group in /.github/workflows with 2 updates: [softprops/action-gh-release](https://github.com/softprops/action-gh-release) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `softprops/action-gh-release` from 2.3.4 to 2.4.1
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.3.4...v2.4.1)

Updates `github/codeql-action` from 3 to 4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 16:15:31 +02:00
萨拉托加
03f71f02cb chore: 调整Award模板阈值 2025-10-13 14:38:38 +08:00
github-actions[bot]
966c7a251a chore: Auto Templates Optimization
Triggered by 3b74c1c4c9

[skip changelog]
2025-10-12 12:50:04 +00:00
Constrat
3b74c1c4c9 fix: update ChooseDifficulty for EN phantom 2025-10-12 14:49:39 +02:00
Constrat
295e7742f1 fix: revert IS2 EN StrategyChange changes 2025-10-12 14:49:22 +02:00
Constrat
bfdd20f6ff fix: add IS2 invest mode to EN, JP and txwy
cc @Manicsteiner @momomochi987

28a768a changed unilaterally tasks that were dependant on global
5516809 fixed but I forgot to add Phantom back
2025-10-12 14:49:05 +02:00
MistEO
63cce9811f docs: update prts.plus repo link 2025-10-12 20:02:28 +08:00
MistEO
0bed1d777a docs: 移除前端公招 2025-10-12 19:59:57 +08:00
Constrat
8ec0974d1b ci: add ownership check to Deploy to GitHub Pages
thanks to @weinibuliu
2025-10-12 13:46:33 +02:00
不留
6d9a6e5a4b ci: Add repo owner judgment to some steps of website-workflow.yml (#14378)
* ci: 为 website-workflow 增加仓库所有者判断

* ci: update workflow

* ci: move ownership check to only configure-gh-pages

---------

Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2025-10-12 13:38:02 +02:00
Constrat
7079975bd2 chore: auto run smoke testing on tools/SmokeTesting modifications 2025-10-11 22:53:01 +02:00
Constrat
f06030ac44 ci(revert): remove lldb as it just crashed the workflow erroring out 2025-10-11 22:52:11 +02:00
Constrat
b56d60aa8f fix: POSIX compliant 2025-10-11 22:43:16 +02:00
Constrat
d7f936cb3c ci(fix): use sh for smoketesting 2025-10-11 22:34:24 +02:00
Constrat
b7b80ebbea fix: preload Minigame EN 2025-10-11 20:43:55 +02:00
HX3N
daa4eab296 chore: YostarKR preload minigame (#14375) 2025-10-11 20:35:16 +02:00
Constrat
fad643985e fix: python formatting 2025-10-11 12:52:05 +02:00
HX3N
b562b6b231 fix: KR monthly card reward 2025-10-11 08:19:26 +09:00
Lucien Shaw
aa89062bdf docs: 更新plume主题并适应新版的collections配置 (#14360)
* chore: 更新pnpm版本

* chore: 更新plume主题

* docs: 适应新版文档主题的collections配置

* style: pre-commit fix
2025-10-10 21:11:54 +08:00
github-actions[bot]
374e9ed1f2 chore: Auto Update Game Resources - 2025-10-10
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18406450197

[skip changelog]
2025-10-10 12:26:59 +00:00
Constrat
959063b34c fix(ci): task sorter UTF-8 BOM fix 2025-10-10 14:25:37 +02:00
Constrat
fbf16d00c1 chore: preload minigame for MT EN 2025-10-10 14:12:10 +02:00
Manicsteiner
bacc34531e chore: YostarJP MT stages and Duel channel (#14362)
* chore: YostarJP MT stages and Duel channel
2025-10-10 14:01:30 +02:00
HX3N
6507ac0072 chore: KR MT navigation (#14365)
* chore: KR MT navigation
2025-10-10 13:59:10 +02:00
Constrat
965b6f69ce fix: EN monthly card reward 2025-10-10 13:51:01 +02:00
github-actions[bot]
eb924b816d chore: Auto Templates Optimization
Triggered by 72bc6d8ace

[skip changelog]
2025-10-10 10:58:15 +00:00
HX3N
72bc6d8ace fix: YostarKR update VisitNext
ref #14357
2025-10-10 19:57:39 +09:00
Constrat
df1a16aca3 feat: preload MT navigation EN
@Manicsteiner @HX3N Just a heads up. The tweets have been posted
2025-10-10 12:16:51 +02:00
Constrat
87f4440209 fix: update VisitNext
ref #14357
2025-10-10 12:05:57 +02:00
uye
76252d42e3 style: c# 统一使用文件范围限定的 namespace 2025-10-10 13:36:18 +08:00
github-actions[bot]
cca22c1493 chore: Auto Update Game Resources - 2025-10-10
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18396496857

[skip changelog]
2025-10-10 04:31:39 +00:00
github-actions[bot]
b0ddb9e28e chore: Auto Templates Optimization
Triggered by 3195129fa7

[skip changelog]
2025-10-10 04:24:57 +00:00
uye
3195129fa7 feat: 支持访问好友半透明界面 2025-10-10 12:24:23 +08:00
status102
42bd5ceaf0 chore: 16-16地图 2025-10-10 12:01:13 +08:00
github-actions[bot]
aae1faef41 chore: Auto Update Game Resources - 2025-10-10
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18395654688

[skip changelog]
2025-10-10 03:34:29 +00:00
Constrat
baf3bc69ca i18n: remove global info for mumu 2025-10-10 00:11:14 +02:00
uye
fde7e7dfa4 Release v5.26.1 (#14351) 2025-10-10 01:08:02 +08:00
github-actions[bot]
0af9034bad docs: Auto Update Changelogs of v5.26.1 (#14352)
* docs: Auto Generate Changelog of Release v5.26.1

* docs: Release v5.26.1 with new features and fixes

This version introduces initial support for the Rebuilding Mandate and significant improvements to the Auto I.S. recruitment strategy, enhancing gameplay experience and fixing various issues.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
2025-10-10 00:50:43 +08:00
uye
516d47bb9d fix: 游戏更新公招界面后无法确认招募 (#14335)
* fix: 游戏更新公招界面后无法确认招募

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-10 00:32:48 +08:00
uye
afc16cf6e6 feat: 新增 cdk 被封禁的提示信息 2025-10-10 00:16:47 +08:00
uye
e52f573a7f fix: 第一次访问 mirror酱 失败时错误提示 cdk 已过期 2025-10-10 00:16:47 +08:00
MistEO
04206e7e5e ci: use sh install zsh to fix resource updater
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18378946272/job/52360092110

Zsh seems to treat the array as a whole string and cannot split it, resulting in traversal errors @Constrat
2025-10-09 22:16:48 +08:00
MistEO
8c71f709db fix: resource version 2025-10-09 21:22:38 +08:00
github-actions[bot]
7f6b490d00 chore: Auto Update Game Resources - 2025-10-09
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18377623299

[skip changelog]
2025-10-09 13:18:11 +00:00
github-actions[bot]
a0bd928f75 chore: Auto Update Game Resources - 2025-10-09
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18370407108

[skip changelog]
2025-10-09 08:33:27 +00:00
github-actions[bot]
fc7c823b9f chore: Auto Update Game Resources - 2025-10-09
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18367676923

[skip changelog]
2025-10-09 06:33:51 +00:00
MistEO
488b16e8e7 fix: Update last_updated date in version.json 2025-10-09 09:07:03 +08:00
MistEO
fcc146ad2a fix: Update last_updated timestamp in version.json 2025-10-09 09:06:16 +08:00
github-actions[bot]
64ec655631 chore: Auto Templates Optimization
Triggered by 35cf87547c

[skip changelog]
2025-10-08 23:09:46 +00:00
github-actions[bot]
35cf87547c chore: Auto Update Game Resources - 2025-10-08
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18360388224

[skip changelog]
2025-10-08 23:08:38 +00:00
uye
4db7a06f01 fix: 手动关闭模拟器后未重启 MAA 时 minitouch 可能失效 2025-10-08 16:48:27 +08:00
Weiyou Wang
24bb443e08 docs: 补充 CopilotTask 的文档 (#14319) 2025-10-08 19:28:21 +11:00
Weiyou Wang
02133548c4 fix: 尝试修复生息演算任务识别并删除编队时卡住的问题 (#14290)
* fix: 尝试修复生息演算任务识别并删除编队时卡住的问题

* refactor: 改用 #self
2025-10-08 16:07:45 +08:00
uye
eff2818404 refactor: 使用 BeginAnimation 替代 新建 Storyboard 并添加动画 2025-10-07 21:38:43 +08:00
dependabot[bot]
8017430308 ci: bump the github-actions group across 1 directory with 2 updates (#14311)
Bumps the github-actions group with 2 updates in the /.github/workflows directory: [softprops/action-gh-release](https://github.com/softprops/action-gh-release) and [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact).


Updates `softprops/action-gh-release` from 2.3.3 to 2.3.4
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.3.3...v2.3.4)

Updates `actions/upload-pages-artifact` from 3 to 4
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.3.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/upload-pages-artifact
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-07 15:28:22 +02:00
github-actions[bot]
9b10bb6e02 chore: Auto Update Game Resources - 2025-10-07
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18306279350

[skip changelog]
2025-10-07 08:11:26 +00:00
Horror Proton
b89777ec07 chore: run smoke test in lldb 2025-10-07 05:41:49 +00:00
Lucien Shaw
e72b6d5e24 docs: 添加目录自动跳转组件并使locale自动生成 (#14299)
* feat: 文档站添加重定向vue小组件

* revert: "docs: 将文档中指向部分文档目录的链接改为指向对应目录下的第一篇文档 (#14292)"

This reverts commit a24c772880.

* docs: zh-tw 目录自动跳转

* docs: zh-cn 目录自动跳转

* docs: ko-kr 目录自动跳转

* docs: ja-jp 目录自动跳转

* docs: en-us 目录自动跳转

* docs: 修复了多语言faq文章中的外链对应语言错误的问题

* refactor: 将matter模块改为default import

* feat: 将文档站的i18n和导航相关设置改为全自动生成

* fix: 去除了冗余的locale属性

文档站根据文件目录名称进行索引,linkName和dirName不可能不相同,故简化为单属性name

* refactor: 调整导航组件生成模块中的部分数据类型

* style: prettier fix
2025-10-04 23:44:54 +08:00
Lucien Shaw
fb0bf0a510 docs: 文档站新增字符画组件 (#14270)
* docs: 拯救牛牛!

* chore: 字符画使用单独目录

* feat: 随机动态加载字符画

* feat: 文档站的开发者工具console会打印随机字符画

* fix: 调整字符画初始行高,修正比例

* refactor: 简化冗余的缩放逻辑

* fix: 测量基准宽度时添加100ms延迟

* chore: Auto update by pre-commit hooks [skip changelog]

* refactor: 加上类型注解,避免编辑器报错

* chore: 更改prettier配置,typescript行尾不使用分号

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 完善字符画大小调整算法,稳定后再调整字体

* fix: 字符画的自适应调整逻辑

* feat: 字符画支持自定义主题

* docs: 调整“字号不要用小数”的注释提示

* fix: 判断document是否定义,避免构建失败

* refactor: 完善字符画获取逻辑

* feat: 为console中展示的字符画添加自动检测主题功能

* fix: 避免因滚动条等原因造成的字符画尺寸抖动

* chore: Priestess

* refactor: 将字符画调取模块置于插件目录下

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-04 23:21:12 +08:00
Goat Boring(山羊博宁88)
a24c772880 docs: 将文档中指向部分文档目录的链接改为指向对应目录下的第一篇文档 (#14292)
* Update newbie.md

* Update newbie.md

* Update newbie.md

* Update newbie.md

* Update newbie.md

* Update readme.md

* Update readme.md

* Update readme.md

* Update readme.md

* Update readme.md
2025-10-04 02:12:26 +08:00
Pylinx171
7a3484dc52 chore: 将mac开发环境下的cmake_osx版本改为13.4 (#14283)
Co-authored-by: lihao2Gops5m9x <li@m8@cx7H5g3eM>
2025-10-03 19:12:11 +08:00
晓丶梦丶仁
2aa2e87fd6 fix: "MiniGame@RM-1@Wait" 2025-10-03 17:20:12 +08:00
Status102
2ef25416f9 perf: RegionOCRer 中 useRaw=false 时, 使用原图二值蒙版代替直接 OCR 二值图像 (#14276)
perf: RegionOCRer中useRaw=false时, 使用原图裁剪代替二值化图像
2025-10-03 16:13:59 +08:00
Rain Yang
435e17867e fix: 增强 playtools 关闭连接时的异常处理,确保套接字安全关闭 (#14280)
* fix: 增强playtools关闭连接时的异常处理,确保套接字安全关闭

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-03 14:14:02 +08:00
Constrat
707d31bb30 fix: EN IS3 encounter ocr
fix MAA,EN服水月肉鸽 事件名识别错误bug
Fixes #1427214272
2025-10-01 15:32:24 +02:00
status102
de08a33db1 fix: 理智药使用数量ocr不准确时中断使用 2025-10-01 19:25:07 +08:00
status102
d724b8ff9c fix: 使用理智药 执行减少次数循环在asst_stop时缺少中断判断 2025-10-01 19:21:47 +08:00
萨拉托加
1bb7828255 chore: YostarJP ocr fix 2025-10-01 15:26:15 +08:00
萨拉托加
d2a81987b2 fix: 修复因失败导致次生预算出错 (#14267) 2025-10-01 07:38:13 +08:00
github-actions[bot]
ed7ee78952 chore: Auto Update Game Resources - 2025-09-30
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18137728844

[skip changelog]
2025-09-30 17:07:49 +00:00
晓丶梦丶仁
2973ebbbdb feat: RM-1 (#14271) 2025-10-01 00:54:41 +08:00
Lucien Shaw
e461208bf9 chore: 完善容器配置及依赖安装 (#14208)
格式化工具部分:
1. pre-commit 引入 python 的格式化工具,包括 black(代码格式化)和 isort(对“包导入顺序”的规范)
2. 允许 prettier 对文档站的 markdown 文件格式化
3. 不允许 prettier 对 markdown 文件中的代码块的代码本身进行格式化
4. 升级了 pre-commit 的各个 hook 的版本
5. 优化了 pre-commit 的日志文本显示

容器总览部分:
1. 由原来的单一轻量环境转为区分空环境、轻量环境和全量环境
2. 空环境是裸 Linux 镜像(Ubuntu),为默认环境
3. 轻量环境适合开发文档站前端
4. 全量环境适合开发 MaaCore
5. 目前,全量环境完整包含了轻量环境,轻量环境完整包含了空环境
6. 在仓库 README.md 中更新了三个环境的描述,并将链接分别设置为对应环境的创建链接
   **注意:没有修改文档站中的对应文件**
7. 在各个语言的开发指南的最后,移除了 Codespace 部分的“安装额外依赖”相关描述,且将链接设置为全量环境的创建链接
   **注意:没有添加“开发文档站”的指南和对应 codespace 的使用方式**

容器的轻量环境和全量环境共有部分:
1. 安装 black 和 isort 包
2. 调整 VS Code 设置,取消先前(对 markdown 文件单独指定 markdownlint 扩展作为格式化工具)的错误设置,现在 markdown 文件仍然使用默认的 prettier 扩展作为格式化工具
3. 引入 markdown-all-in-one 扩展作为语法提示工具
4. 将 node_modules 和 3rdparty 排除在 VS Code 的文本的搜索路径之外

容器的全量环境部分:
1. 为 tools 下的所有 python 脚本安装依赖
2. 使用 tools/maadeps-download.py 下载 maadeps,且将必要二进制文件软链接到 /usr/local/bin/
3. 使用 apt 安装 cmake 和 clangd-20,将后者通过 update-alternatives 设置为系统 clangd 的默认版本
4. 使用 cmake tools 扩展,并按照 Linux 编译方法进行配置
5. 使用 clang-format 作为 c/cpp 的格式化工具,clang-format 程序主体来自 maadeps(已经软链接到 /usr/local/bin/)
6. 使用 clangd 作为 c/cpp 的语法提示工具
7. 将 MaaDeps、install 和 build 排除在 VS Code 的文本搜索路径之外

其它手动调整:
1. 更新文档站的 package.json,指定 pnpm 包管理器的版本
2. 手动保证 markdown 文件中的列表前后有空行(注意到 MarkdownLint 官方规则不一定能精准定位所有“列表前后空行”的问题,详见:https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md032---lists-should-be-surrounded-by-blank-lines )
3. 修改了部分 markdown 文件中的 json 代码块的语法问题
   **注意:相同的问题并未全部发现,仅修改了两处**
4. 在 tools 目录中,一处 python 脚本的包名误用(本地包名和某个 pip 包重名),这里修改了相应代码
5. 在 tools 目录中,一处 python 脚本使用了弃用的包 cchardet 的问题,这里更换了推荐使用的功能相近的包并修改了相应代码

自动化脚本提交的修改:
1. 自动格式化了大量 tools 中的 python 脚本
2. 自动格式化了大量 docs 中的 markdown 文件

Commits:

* chore: pre-commit引入black和isort规范py文件

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: devcontainer添加isort扩展,排序python导入

* chore: pre-commit任务命名及更名

* style: isort fix

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: 更新pre-commit的hook版本

* fix: 模块名与第三方库重名,大忌

* chore: 容器构建时额外安装isort

* docs: md -> markdown

* chore: 容器安装python包和maadeps

* fix: 修复过时python包

* chore: 指定pnpm版本

* chore: container支持选择轻量环境

* chore: 去掉rust

* chore: add plain env

* chore: 使用clangd语言服务器

* chore: 无需单独设置markdown的格式化工具

* chore: 更新安装的clangd版本

* docs: 简易文档适配

* docs: 在仓库README中重新编排codespaces相关指引

* chore: Auto update by pre-commit hooks [skip changelog]

* style: 调整缩进

* chore: 格式化工具不用特意排除被gitignore忽略的文件

* chore: sh文件在gitattributes中单列一类

* chore: 格式化docs下的markdown文件

* chore: 暂时不修改md文件中的代码块

* style: 人为明确markdown中的部分列表相关格式

* docs: 补上部分markdown的json代码块中缺失的逗号

* chore: Auto update by pre-commit hooks [skip changelog]

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 补上tools的服务器排序相关代码中缺失的逗号

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: 使用maadeps的clangd

* build: 更新maadeps工具链版本

* style: prettier fix

* revert: 还原maadeps版本

* revert: 取消使用maadeps的clangd依赖,改用系统apt安装

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-30 19:39:48 +08:00
github-actions[bot]
22faefe71a chore: Auto Update Game Resources - 2025-09-30
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18121756589

[skip changelog]
2025-09-30 07:09:27 +00:00
uye
7d080de077 Release v5.26.0 (#14261) 2025-09-30 14:21:11 +08:00
github-actions[bot]
cc65a68384 docs: Auto Update Changelogs of v5.26.0 (#14262)
* docs: Auto Generate Changelog of Release v5.26.0

* docs: Update CHANGELOG for v5.26.0 enhancements and fixes

* docs: Update CHANGELOG with recent fixes and optimizations

* docs: 更新 CHANGELOG,添加次生预案支持和自动肉鸽优化说明

* docs: 修正 CHANGELOG 中关于次生预案的描述格式

* docs: 更新 CHANGELOG,添加「次生预案」和自动肉鸽的提示信息

* docs: 修正 CHANGELOG 中关于次生预案的描述,优化提示信息

* docs: 更新 CHANGELOG,修正次生预案部分的描述,优化资源点数说明

* docs: 修正 CHANGELOG 中关于次生预案提示信息的描述格式

* docs: 更新 CHANGELOG,完善次生预案功能描述,增加资源点数和材料信息

* docs: Revise CHANGELOG for recent updates and fixes

Updated the changelog to reflect changes in recruitment strategy, settings guide improvements, and documentation website redesign.

* docs: Revise CHANGELOG for new features and fixes

Updated the changelog to reflect changes in the '次生预案' feature and adjustments in the automatic meat pigeon recruitment strategy.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: AnnAngela <naganjue@vip.qq.com>
2025-09-30 14:20:54 +08:00
萨拉托加
0bb19a7376 fix: 水月肉鸽委托任务完成检测优先级过低 2025-09-30 13:59:19 +08:00
Weiyou Wang
ea6540cf6b fix: 商店刷新两步走 (#14201)
* fix: 商店刷新两步走

* chore: Auto update by pre-commit hooks [skip changelog]

* refactor: buy once only when both steps succeed (suggested by status102)

Co-Authored-By: Status102 <102887808+status102@users.noreply.github.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Status102 <102887808+status102@users.noreply.github.com>
2025-09-29 17:20:32 +08:00
萨拉托加
df75025dc5 perf: 调整界园肉鸽招募策略 (#14255) 2025-09-29 12:32:25 +08:00
Rbqwow
7ab8994ed8 docs: 更新文档 (#14236)
* docs: 补充自动战斗前提

* docs: 自动战斗傀影开局添加丰川祥子

* docs: 更新肉鸽闪断处理相关描述

* chore: Auto update by pre-commit hooks [skip changelog]

* docs: 更新肉鸽文档

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: 萨拉托加 <151550168+Saratoga-Official@users.noreply.github.com>
2025-09-29 12:29:40 +08:00
Manicsteiner
a263b62e63 feat: 萨卡兹肉鸽 待诉说的故事 二次选择 (#14246) 2025-09-29 12:21:24 +08:00
萨拉托加
bf7b2e633b fix: 水月肉鸽商店刷新延迟不够
fix #14256
2025-09-29 10:49:25 +08:00
github-actions[bot]
65b84f5dbd chore: Auto Update Game Resources - 2025-09-28
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/18079189511

[skip changelog]
2025-09-28 20:08:28 +00:00
Manicsteiner
347f1e191e chore: YostarJP roguelike edits (#14252) 2025-09-28 21:00:23 +02:00
uye
7905eb9fed fix: 按钮显示文字错误 2025-09-28 13:55:30 +08:00
萨拉托加
3a6c49de0c fix: 次生预案模拟器卡了容易点过头 2025-09-28 09:38:03 +08:00
Hao Guan
0be1253334 ci: update macOS runner 2025-09-27 23:29:43 +08:00
Hao Guan
a10ab607b0 chore(mac): 新图标和界面风格 2025-09-27 22:24:14 +08:00
Lancarus
45649de131 perf: 优化界园肉鸽部分关卡策略 (#14244)
* perf: 优化界园肉鸽部分关卡策略

* fix: 按照建议修改

* chore: Auto update by pre-commit hooks [skip changelog]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-27 20:03:03 +08:00
uye
c3ebfce07b feat: mac 支持次生预案 2025-09-27 14:59:39 +08:00
Constrat
a57e5cf98a fix: clang 2025-09-26 21:54:06 +02:00
uye
78ff33d6f0 fix: 怎么还有人在用 adb input 2025-09-27 00:32:11 +08:00
uye
a64bfc5ba3 perf: 优化次生预案执行速度 2025-09-26 23:21:22 +08:00
3795 changed files with 333101 additions and 58045 deletions

View File

@@ -0,0 +1,26 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu
USER vscode
ENV PATH="/home/vscode/.local/bin:${PATH}"
ARG PYTHON_VERSION=3.12.11
ARG NODEJS_VERSION=24
# Install and setup mise and uv
RUN curl https://mise.run | sh
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# Activate mise
RUN echo 'eval "$(mise activate bash)"' >> ~/.bashrc
# Setup Python and Node.js
RUN mise use -g node@$NODEJS_VERSION
RUN uv python install $PYTHON_VERSION
# Create and activate venv
RUN uv venv --clear ~/.venv/maa
RUN echo "source ~/.venv/maa/bin/activate" >> ~/.bashrc
# Install tools
RUN uv tool install prek

View File

@@ -0,0 +1,48 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "MAA Docs Env (Light)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"build": {
"dockerfile": "Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3001],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash .devcontainer/0/post-create.sh",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"nekosu.maa-support",
"esbenp.prettier-vscode",
"DavidAnson.vscode-markdownlint",
"yzhang.markdown-all-in-one",
"vue.volar",
"mkxml.vscode-filesize"
],
"settings": {
// Color theme
"workbench.colorTheme": "Default Dark Modern",
// Editor formatting
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
// Performance optimizations
"search.exclude": {
"**/node_modules": true,
"**/3rdparty": true
}
}
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

View File

@@ -0,0 +1,19 @@
#!/bin/bash
WORKSPACE=$(pwd)
echo "===================="
cd "$WORKSPACE"
echo "Setting up git safe.directory..."
git config --global --add safe.directory "$WORKSPACE"
git submodule foreach --recursive 'git config --global --add safe.directory "$toplevel/$path"'
echo "===================="
cd "$WORKSPACE"
echo "Updating submodules..."
git submodule update --init --recursive
echo "===================="
cd "$WORKSPACE"/docs
echo "Installing node modules..."
npm install -g pnpm
pnpm install --frozen-lockfile

View File

@@ -0,0 +1,41 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu
USER vscode
ENV PATH="/home/vscode/.local/bin:${PATH}"
ARG CLANGD_VERSION=20
ARG PYTHON_VERSION=3.12.11
ARG NODEJS_VERSION=24
# Install system dependencies
RUN sudo apt update \
&& sudo apt upgrade -y \
&& sudo apt install -y \
cmake \
fish \
&& sudo rm -rf /var/lib/apt/lists/*
# Initialize fish
RUN fish -c exit
# Install and setup mise and uv
RUN curl https://mise.run | sh
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# Activate mise
RUN echo 'eval "$(mise activate bash)"' >> ~/.bashrc
RUN echo 'mise activate fish | source' >> ~/.config/fish/config.fish
# Setup Python and Node.js
RUN mise use -g node@$NODEJS_VERSION
RUN uv python install $PYTHON_VERSION
# Create and activate venv
RUN uv venv --clear ~/.venv/maa
RUN echo "source ~/.venv/maa/bin/activate" >> ~/.bashrc
RUN echo "source ~/.venv/maa/bin/activate.fish" >> ~/.config/fish/config.fish
# Install tools
RUN uv tool install prek
RUN uv tool install ruff

View File

@@ -0,0 +1,82 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "MAA Core Env (Full)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"build": {
"dockerfile": "Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3001],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash .devcontainer/1/post-create.sh",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"nekosu.maa-support",
"ms-vscode.cmake-tools",
"xaver.clang-format",
"llvm-vs-code-extensions.vscode-clangd",
"ms-python.python",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"DavidAnson.vscode-markdownlint",
"yzhang.markdown-all-in-one",
"vue.volar",
"mkxml.vscode-filesize"
],
"settings": {
// Color theme
"workbench.colorTheme": "Default Dark Modern",
// Editor formatting
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
// Language-specific formatting
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
},
"[cpp]": {
"editor.defaultFormatter": "xaver.clang-format"
},
"[c]": {
"editor.defaultFormatter": "xaver.clang-format"
},
// Python runtime
"python.terminal.launchArgs": ["-u"],
"python.defaultInterpreterPath": "/home/vscode/.venv/maa/bin/python",
"python.terminal.activateEnvironment": false,
// CMake settings
"cmake.configureSettings": {
"BUILD_DEBUG_DEMO": "ON",
"CMAKE_TOOLCHAIN_FILE": "src/MaaUtils/MaaDeps/cmake/maa-x64-linux-toolchain.cmake"
},
"cmake.configureOnOpen": false,
// Performance optimizations
"search.exclude": {
"**/node_modules": true,
"**/build": true,
"**/install": true,
"**/MaaDeps": true,
"**/3rdparty": true
}
}
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

View File

@@ -0,0 +1,45 @@
#!/bin/bash
WORKSPACE=$(pwd)
echo "===================="
cd "$WORKSPACE"
echo "Setting up git safe.directory..."
git config --global --add safe.directory "$WORKSPACE"
git submodule foreach --recursive 'git config --global --add safe.directory "$toplevel/$path"'
echo "===================="
cd "$WORKSPACE"
echo "Updating submodules..."
git submodule update --init --recursive
echo "===================="
cd "$WORKSPACE"/docs
echo "Installing node modules..."
npm install -g pnpm
pnpm install --frozen-lockfile
echo "===================="
cd "$WORKSPACE"
echo "Installing Python dependencies..."
# Install Python dependencies from all tools
for req_file in tools/*/requirements.txt; do
if [ -f "$req_file" ]; then
echo "Installing from $req_file"
uv pip install -r "$req_file"
fi
done
for req_file in tools/*/requirements-dev.txt; do
if [ -f "$req_file" ]; then
echo "Installing from $req_file"
uv pip install -r "$req_file"
fi
done
echo "===================="
cd "$WORKSPACE"
echo "Installing MaaDeps..."
python tools/maadeps-download.py
# Link clang-format & clangd to /usr/local/bin for easy access
sudo ln -s $WORKSPACE/src/MaaUtils/MaaDeps/x-tools/llvm/bin/clang-format /usr/local/bin/clang-format
sudo ln -s $WORKSPACE/src/MaaUtils/MaaDeps/x-tools/llvm/bin/clangd /usr/local/bin/clangd

View File

@@ -1,29 +0,0 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu
USER vscode
ENV CONDA_DIR=/home/vscode/miniconda
ENV PATH="$CONDA_DIR/bin:$PATH"
ARG PYTHON_VERSION=3.12
ARG NODEJS_VERSION=24
# Install Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh \
&& bash ~/miniconda.sh -b -p $CONDA_DIR \
&& rm ~/miniconda.sh \
&& conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main \
&& conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
# Configure conda environment
RUN eval "$(conda shell.bash hook)" \
&& conda create -n maa python=$PYTHON_VERSION -y \
&& conda activate maa \
&& conda install -y conda-forge::nodejs=$NODEJS_VERSION \
&& pip install pre-commit black \
&& npm install -g pnpm
# Finalize conda setup
RUN conda init \
&& conda config --set auto_activate false \
&& echo "conda activate maa" >> ~/.bashrc

View File

@@ -1,50 +1,13 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "MAA",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"build": {
"dockerfile": "Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3001],
// Use 'postCreateCommand' to run commands after the container is created.
"name": "Plain Env (Nothing Installed)",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"postCreateCommand": "bash .devcontainer/post-create.sh",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"mkxml.vscode-filesize",
"nekosu.maa-support",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode",
"vue.volar",
"ms-python.python",
"ms-python.black-formatter"
],
"settings": {
// format
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
// python
"python.terminal.launchArgs": ["-u"],
"python.defaultInterpreterPath": "/home/vscode/miniconda/envs/maa/bin/python",
"python.terminal.activateEnvironment": false
// Color theme
"workbench.colorTheme": "Default Dark Modern"
}
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

View File

@@ -1,21 +1,13 @@
#!/bin/bash
WORKSPACE=$(pwd)
# conda activate maa
echo "===================="
echo "Setting up git safe.directory for $WORKSPACE and its submodules..."
cd "$WORKSPACE"
echo "Setting up git safe.directory..."
git config --global --add safe.directory "$WORKSPACE"
git submodule foreach --recursive 'git config --global --add safe.directory "$toplevel/$path"'
echo "===================="
cd "$WORKSPACE"
echo "Installing dependencies for python..."
# pip install -r tools/.../requirements.txt
# pip install -r tools/.../requirements-dev.txt
echo "===================="
echo "Installing dependencies for nodejs..."
cd "$WORKSPACE"/docs
pnpm install --frozen-lockfile
echo "Updating submodules..."
git submodule update --init --recursive

View File

@@ -46,9 +46,13 @@ e3d63894b28b2ef5e2405e144a32a6981de5e1b2
# refactor: divide tasks.json into multiple jsons
dce6e317c8e56836662b64ac4b3d1a69b4ff4dd8
# c# 统一使用文件范围限定的 namespace
76252d42e3febae1aef396e8ee5482fa46d565c6
# usage: add "[blame ignore]" to the commit message
# This file is managed by an automated workflow
# Do not add, remove or modify lines below this comment
# as they are automatically appended
# --------------------------------------------------- #
f7772bc814c52f9a5e65af02404cf54b70fe0a32
ca9807ce099e5cae133293df8dfcd2b56b0e06bd

2
.gitattributes vendored
View File

@@ -10,3 +10,5 @@
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.sh text eol=lf

View File

@@ -1 +1 @@
272d71fa2938f945832f86232532b86a9e5406b8
1944164d9c47549d71c3b25987e9299404cc16f3

View File

@@ -41,11 +41,9 @@ body:
attributes:
label: 日志和配置文件
description: |
**请在 MAA -> 设置 -> 问题反馈中找到生成日志压缩包按钮,点击并上传压缩包**
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
如果你在使用 MacBook请点击屏幕左上角的“文件”点击“打开日志文件夹”
**请在 MAA -> 设置 -> 问题反馈中找到生成日志压缩包按钮,点击并上传压缩包**
**若待上传压缩包大于 25MB请转而上传该压缩包同日期文件夹中的若干小压缩包**
若正在使用 macOS请点击屏幕左上角的“文件”点击“打开日志文件夹”
placeholder: |
请确认上传文件前已关闭 MAA
validations:
@@ -55,8 +53,8 @@ body:
attributes:
label: 配置信息
description: |
请说明操作系统及版本、模拟器品牌、模拟器分辨率、DPI、帧率
若正在使用 MuMu 或雷电 9请说明截图增强是否开启
请说明操作系统及版本、模拟器品牌、模拟器分辨率、DPI、帧率
若正在使用 MuMu 或雷电 9请说明截图增强是否开启
最后请说明 GPU 加速推理是否开启,若开启请提供 GPU 型号。
validations:
required: true
@@ -65,11 +63,9 @@ body:
attributes:
label: 截图或录屏
description: |
`debug` 目录下按功能分类的文件夹内,有一些自动截图的错误图片,若有相关的,请一并打包上传
可上传屏幕截图或录制以帮助解释你的问题,包括但不限于 MAA 软件截图、游戏画面截图
若是**识别相关问题**,请尽可能提供模拟器自带的截图工具截取的无遮挡的**原图**(或通过 adb 截取原图)
用其他的工具如QQ/微信截取的图片包含窗口边框且长宽比、分辨率不固定不利于我们排除bug
可上传屏幕截图或录制以帮助解释你的问题,包括但不限于 MAA 软件截图、游戏画面截图
若是**识别相关问题**,请尽可能提供模拟器自带的截图工具截取的无遮挡的**原图**(或通过 adb 截取原图)
用其他的工具如QQ/微信截取的图片包含窗口边框且长宽比、分辨率不固定不利于我们排除bug
若文件体积过大可压缩后再上传
validations:
required: false

View File

@@ -43,11 +43,9 @@ body:
attributes:
label: Log and config files
description: |
**Please locate the Generate Support Payload button under MAA Settings -> Issue Report, click the button, and upload the generated zip file**
**Please drag and drop the full file in, not your own cuttings or copies; compress it before uploading if too large.**
If you are using MacBook, please click the "File" option in the top-left corner of the screen, then click "Open Log Folder".
**Please locate the Generate Support Payload button under MAA Settings -> Issue Report, click the button, and upload the generated zip file**
**If the archive to upload is larger than 25MB, please upload smaller archives from the same date folder instead.**
If you are using macOS, please click the "File" option in the top-left corner of the screen, then click "Open Log Folder".
placeholder: |
Please confirm that MAA is not running before uploading files.
validations:
@@ -57,8 +55,8 @@ body:
attributes:
label: Configuration information
description: |
Please specify the operating system and version, emulator brand, emulator resolution, DPI, and frame rate;
If you are using MuMu or LDPlayer 9, please specify whether Screenshot Enhancement is enabled;
Please specify the operating system and version, emulator brand, emulator resolution, DPI, and frame rate.
If you are using MuMu or LDPlayer 9, please specify whether Screenshot Enhancement is enabled.
Finally, please specify whether GPU accelerated inference is enabled, and if so, provide the GPU model.
validations:
required: true
@@ -67,22 +65,15 @@ body:
attributes:
label: Screenshots or recordings
description: |
In the `debug` directory, within the functionally categorized folders,
there are some error images captured automatically.
If related to this issue, please upload them together.
If available, upload screenshots and recordings to help explain your problem,
including but not limited to screenshots of MAA software,
screenshots of game screens.
screenshots of game screens.
If the problem is **recognition related**, please help by providing
the **original image** taken by the emulator's own screenshot tool
(or via adb).
(or via adb).
Screenshots taken with other tools may contain the frames of the window/emulator
and their aspect ratio and resolution are inconsistent,
which makes it harder for us to debug.
which makes it harder for us to debug.
If the file size is too large, you may compress it before uploading.
validations:
required: false

View File

@@ -9,6 +9,7 @@ updates:
assignees:
- AnnAngela
- Constrat
- lucienshawls
groups:
github-actions:
patterns:

View File

@@ -252,7 +252,7 @@ labels:
# `module: fight`
- name: fight
content: "module: fight"
regexes: "刷图|理智|剿灭|刷.{0,6}材料|关卡选择|战斗|作战|[戰戦][鬥闘]|[Ff]ight|[Bb]attle|[Aa]nihilation"
regexes: "刷图|理智|剿灭|刷.{0,6}材料|关卡选择|战斗|作战|[戰戦][鬥闘]|[Ff]ight|[Bb]attle|[Aa]nihilation"
skip-if:
- skip all
- skip module
@@ -335,7 +335,7 @@ labels:
# `MacGui`
- name: MacGui
content: "client: MacGui"
regexes: '/mac(?:book|os|\s*(?:操作系统|系统|电脑|版))|playcover/i'
regexes: '(?:[Mm][Aa][Cc](?:[Bb][Oo][Oo][Kk]|[Oo][Ss]|\s*(?:操作系统|系统|电脑|版|[Gg][Uu][Ii]))|[Pp][Ll][Aa][Yy][Cc][Oo][Vv][Ee][Rr]|[Mm][Aa][Cc]\s+[Gg][Uu][Ii])'
skip-if:
- skip all
- skip client

View File

@@ -1,38 +1,46 @@
$totalClearedSize = 0
$cacheList = gh cache list --json id,ref,sizeInBytes | ConvertFrom-Json
$prCaches = $cacheList | Where-Object { $_.ref -like "*merge*" }
if (-not $prCaches) {
Write-Output "No PR caches found."
exit
$branchSet = @{}
git ls-remote --heads origin | ForEach-Object {
if ($_ -match 'refs/heads/(.+)$') { $branchSet[$matches[1]] = $true }
}
foreach ($cache in $prCaches) {
$cacheId = $cache.id
$cacheRef = $cache.ref
$cacheSizeInBytes = $cache.sizeInBytes
foreach ($cache in $cacheList) {
$shouldDelete = $false
if ($cacheRef -match "refs/pull/(\d+)/merge") {
if ($cache.ref -match "refs/pull/(\d+)/merge") {
$prNumber = $matches[1]
Write-Host "PR #${prNumber}: " -NoNewline
$prStatus = gh pr view $prNumber --json state | ConvertFrom-Json
Write-Host $prStatus.state -NoNewline
if ($prStatus.state -eq "MERGED" -or $prStatus.state -eq "CLOSED") {
Write-Host " -> DELETING"
gh cache delete $cacheId
try {
$prStatus = (gh pr view $prNumber --json state | ConvertFrom-Json).state
Write-Host "$prStatus" -NoNewline
$shouldDelete = $prStatus -in @("MERGED", "CLOSED")
}
catch {
Write-Host "NOT FOUND" -NoNewline
$shouldDelete = $true
}
}
elseif ($cache.ref -match "refs/heads/(.+)" -and $matches[1] -ne "dev") {
$branchName = $matches[1]
$exists = $branchSet.ContainsKey($branchName)
Write-Host "Branch '$branchName': $(if ($exists) { 'EXISTS' } else { 'DELETED' })" -NoNewline
$shouldDelete = -not $exists
}
else {
continue
}
$totalClearedSize += $cacheSizeInBytes
}
else {
Write-Host ""
}
if ($shouldDelete) {
Write-Host " -> DELETING"
gh cache delete $cache.id
$totalClearedSize += $cache.sizeInBytes
}
else {
Write-Host ""
}
}
$formattedSize = "{0:N2}" -f ($totalClearedSize / 1MB)
Write-Output "Cleared size: $formattedSize MB"
Write-Output "Cleared size: $("{0:N2}" -f ($totalClearedSize / 1MB)) MB"

View File

@@ -11,7 +11,8 @@ $keyPatterns = @(
"macOS-arm64-maadeps",
"Linux-x64-maadeps",
"Linux-arm64-maadeps",
"Smoke-testing"
"Smoke-testing",
"prek-v1|Linux|X64"
)
# Filter caches matching any of our key patterns

View File

@@ -19,7 +19,8 @@ $keyPatterns = @(
"macOS-arm64-maadeps",
"Linux-x64-maadeps",
"Linux-arm64-maadeps",
"Smoke-testing"
"Smoke-testing",
"prek-v1|Linux|X64"
)
foreach ($pattern in $keyPatterns) {

View File

@@ -1,4 +1,4 @@
name: Git Blame Ignore
name: Blame Ignore Update
on:
schedule:
@@ -7,18 +7,20 @@ on:
jobs:
blame-ignore:
name: Update Git Blame Ignore Revs
if: github.repository_owner == 'MaaAssistantArknights'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false # Needed to bypass protection rules in Push changes
- name: Check blame
id: check_changes
continue-on-error: true
run: |
LAST_CHECKED_COMMIT=$(cat .github/.last-blame-ignore-commit 2>/dev/null || git rev-list --max-parents=0 HEAD)
@@ -26,7 +28,7 @@ jobs:
git diff --quiet .git-blame-ignore-revs
- name: Commit and Push changes
- name: Commit changes
if: ${{ steps.check_changes.outcome == 'failure' }}
run: |
git config user.name "github-actions[bot]"

View File

@@ -1,4 +1,4 @@
name: Delete Cache
name: Cache Cleanup
on:
pull_request:
@@ -11,13 +11,14 @@ on:
jobs:
cache-delete:
name: Delete PR Cache
# Run only on organization branches with PRs
if: github.event_name == 'workflow_dispatch' ||
github.event.pull_request.head.repo.full_name ==
github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- name: Delete cache on PR merged
- name: Delete PR cache
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
PR_NUMBER=${{ github.event.inputs.pr_number }}

View File

@@ -1,4 +1,4 @@
name: ci
name: Release Pipeline
on:
push:
@@ -7,79 +7,74 @@ on:
branches-ignore:
- "master"
paths:
- ".github/workflows/ci.yml"
- "3rdparty/include/**"
- "include/**"
- "src/**"
- "cmake/**"
- "CMakeLists.txt"
- ".github/workflows/ci.yml"
- "!**/*.md"
- "include/**"
- "src/**"
- "tools/maadeps-download.py"
- "!**/*.md"
pull_request:
branches:
- "dev"
paths:
- ".github/workflows/ci.yml"
- "3rdparty/include/**"
- "include/**"
- "src/**"
- "cmake/**"
- "CMakeLists.txt"
- "!**/*.md"
- "include/**"
- "src/**"
- "tools/maadeps-download.py"
- "!**/*.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.head_ref || github.ref_name }}${{ github.ref == 'refs/heads/dev' && format('-{0}', github.sha) || '' }}
cancel-in-progress: true
jobs:
meta:
# Prevent duplicate runs on organization branches with PRs
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
name: Gather Meta Information
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.set_tag.outputs.tag }}
prerelease: ${{ steps.set_pre.outputs.prerelease }}
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
path: temp
show-progress: false
- name: Fetch history
if: ${{ !startsWith(github.ref, 'refs/pull/') }}
- name: Show concurrency group
run: |
git init
cp $GITHUB_WORKSPACE/temp/.git/config ./.git
rm -rf $GITHUB_WORKSPACE/temp
# git config remote.origin.fetch '+refs/*:refs/*'
git fetch --filter=tree:0 # --update-head-ok
git reset --hard origin/$(git branch --show-current) || true
git checkout ${{ github.ref_name }}
echo "Concurrency Group: ${{ github.workflow }}-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.head_ref || github.ref_name }}${{ github.ref == 'refs/heads/dev' && format('-{0}', github.sha) || '' }}"
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
show-progress: false
- name: Set tag
id: set_tag
run: |
${{ startsWith(github.ref, 'refs/pull/') && 'cd temp' || '' }}
echo tag=$(git describe --tags --match "v*" ${{ github.ref }} || git rev-parse --short HEAD) | tee -a $GITHUB_OUTPUT
exit ${PIPESTATUS[0]}
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
# For tag pushes, use the tag name
tag="${{ github.ref_name }}"
else
# For PRs and branch pushes, use git describe or fallback
tag=$(git describe --tags --match "v*" HEAD 2>/dev/null || echo "v0.0.1-$(git rev-parse --short HEAD)")
fi
echo "tag=${tag}" | tee -a $GITHUB_OUTPUT
- name: Judge pre-release
- name: Check if it is a pre-release
id: set_pre
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
if: startsWith(github.ref, 'refs/tags/v')
run: |
if [[ '${{ steps.set_tag.outputs.tag }}' =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo prerelease=false | tee -a $GITHUB_OUTPUT
echo "prerelease=false" | tee -a $GITHUB_OUTPUT
else
echo prerelease=true | tee -a $GITHUB_OUTPUT
echo "prerelease=true" | tee -a $GITHUB_OUTPUT
fi
- name: Generate changelog
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Finalize changelog
if: startsWith(github.ref, 'refs/tags/v')
run: |
this_tag=${{ steps.set_tag.outputs.tag }}
if [[ '${{ steps.set_pre.outputs.prerelease }}' != 'false' ]]; then
@@ -92,19 +87,15 @@ jobs:
echo >> CHANGELOG.md
echo "[已有 Mirror酱 CDK前往 Mirror酱 高速下载](https://mirrorchyan.com/zh/projects?rid=MAA&source=maagh-release)" >> CHANGELOG.md
- name: Upload changelog to Github
uses: actions/upload-artifact@v4
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Upload changelog to GitHub
uses: actions/upload-artifact@v6
if: startsWith(github.ref, 'refs/tags/v')
with:
name: changelog
path: CHANGELOG.md
windows:
# Prevent duplicate runs on organization branches with PRs
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
name: Build for Windows
needs: meta
strategy:
matrix:
@@ -113,21 +104,23 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
- name: Fetch submodules
run: |
git submodule update --init --depth 1 src/MaaUtils
git submodule update --init --depth 1 3rdparty/EmulatorExtras
- name: Cache MaaDeps
id: cache-maadeps
uses: actions/cache@v4
uses: actions/cache@v5
continue-on-error: true
with:
path: |
./MaaDeps
./src/MaaUtils/MaaDeps
key: ${{ runner.os }}-${{ matrix.arch }}-maadeps-${{ hashFiles('tools/maadeps-download.py') }}
- name: Bootstrap MaaDeps
@@ -140,20 +133,21 @@ jobs:
- name: Config cmake
run: |
mkdir -p build
cmake -B build ${{ matrix.arch == 'arm64' && '-A ARM64' }} -DCMAKE_BUILD_TYPE=Release -DMAADEPS_TRIPLET='maa-${{ matrix.arch }}-windows' -DINSTALL_RESOURCE=ON -DINSTALL_PYTHON=ON -DMAA_HASH_VERSION='${{ needs.meta.outputs.tag }}' -DBUILD_WPF_GUI=OFF
cmake -B build ${{ matrix.arch == 'arm64' && '-A ARM64' }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMAADEPS_TRIPLET='maa-${{ matrix.arch }}-windows' -DINSTALL_RESOURCE=ON -DINSTALL_PYTHON=ON -DMAA_HASH_VERSION='${{ needs.meta.outputs.tag }}' -DBUILD_WPF_GUI=OFF
- name: Build
run: |
cmake --build build --config Release --parallel $env:NUMBER_OF_PROCESSORS
cmake --build build --config RelWithDebInfo --parallel $env:NUMBER_OF_PROCESSORS
- name: Install
run: |
mkdir -p install
cmake --install build --prefix install --config Release
cmake --install build --prefix install --config RelWithDebInfo
- name: Cache .nuke/temp, ~/.nuget/packages
id: cache-nuget
uses: actions/cache@v4
uses: actions/cache@v5
continue-on-error: true
with:
path: |
.nuke/temp
@@ -164,7 +158,7 @@ jobs:
if: steps.cache-nuget.outputs.cache-hit != 'true'
run: dotnet restore src/MaaWpfGui/MaaWpfGui.csproj
- name: Taggify Version for csproj
- name: Taggify version for csproj
run: |
$csprojPath = "src/MaaWpfGui/MaaWpfGui.csproj"
$csprojPath = Resolve-Path -Path $csprojPath
@@ -185,11 +179,24 @@ jobs:
- name: Publish WPF GUI
continue-on-error: true
run: |
dotnet publish src/MaaWpfGui/MaaWpfGui.csproj -c Release -o install
dotnet publish src/MaaWpfGui/MaaWpfGui.csproj -c Release -p:Platform=${{ matrix.arch == 'arm64' && 'ARM64' || 'x64' }} -o install
- name: Organize Install Files
- name: Collect PDB files
run: |
cp build/bin/RelWithDebInfo/*.pdb install/
Compress-Archive -Path install/*.pdb -DestinationPath install/MAAComponent-DebugSymbol-${{ needs.meta.outputs.tag }}-win-${{ matrix.arch }}.zip
continue-on-error: true
- name: Upload PDB files
uses: actions/upload-artifact@v6
with:
name: MAAComponent-DebugSymbol-win-${{ matrix.arch }}
path: install/MAAComponent-DebugSymbol-${{ needs.meta.outputs.tag }}-win-${{ matrix.arch }}.zip
- name: Organize install files
shell: bash
run: |
rm -rf install/MAAComponent-DebugSymbol-*.zip
rm -rf install/*.pdb
rm -rf install/msvc-debug
rm -rf install/*.h
@@ -201,18 +208,14 @@ jobs:
cd install
Compress-Archive -Destination MAA-${{ needs.meta.outputs.tag }}-win-${{ matrix.arch }}.zip -Path ./*
- name: Upload MAA to Github
uses: actions/upload-artifact@v4
- name: Upload MAA to GitHub
uses: actions/upload-artifact@v6
with:
name: MAA-win-${{ matrix.arch }}
path: install/*.zip
path: install/MAA-*.zip
ubuntu:
# Prevent duplicate runs on organization branches with PRs
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
name: Build for Ubuntu
needs: meta
runs-on: ubuntu-latest
strategy:
@@ -220,21 +223,23 @@ jobs:
arch: [aarch64, x86_64]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
- name: Fetch submodules
run: |
git submodule update --init --depth 1 src/MaaUtils
git submodule update --init --depth 1 3rdparty/EmulatorExtras
git submodule update --init --depth 1 src/maa-cli
- name: Cache MaaDeps
id: cache-maadeps
uses: actions/cache@v4
uses: actions/cache@v5
continue-on-error: true
with:
path: ./MaaDeps
path: ./src/MaaUtils/MaaDeps
key: ${{ runner.os }}-${{ matrix.arch == 'x86_64' && 'x64' || 'arm64' }}-maadeps-${{ hashFiles('tools/maadeps-download.py') }}
- name: Bootstrap MaaDeps
@@ -248,36 +253,35 @@ jobs:
run: |
mkdir -p build
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DMAADEPS_TRIPLET='maa-${{ matrix.arch == 'x86_64' && 'x64' || 'arm64' }}-linux' \
-DINSTALL_RESOURCE=ON \
-DINSTALL_PYTHON=ON \
-DMAA_HASH_VERSION='${{ needs.meta.outputs.tag }}' \
-DCMAKE_TOOLCHAIN_FILE=MaaDeps/cmake/maa-${{ matrix.arch == 'x86_64' && 'x64' || 'arm64' }}-linux-toolchain.cmake
-DCMAKE_TOOLCHAIN_FILE=src/MaaUtils/MaaDeps/cmake/maa-${{ matrix.arch == 'x86_64' && 'x64' || 'arm64' }}-linux-toolchain.cmake
- name: Build
run: |
cmake --build build --config Release --parallel $(nproc)
cmake --build build --config RelWithDebInfo --parallel $(nproc)
env:
CLICOLOR_FORCE: 1
- name: Install
run: |
mkdir -p install
cmake --install build --prefix install --config Release
cmake --install build --prefix install --config RelWithDebInfo
- name: Setup Cross Compile Toolchains for CLI
- name: Setup cross compile toolchains for CLI
uses: ./src/maa-cli/.github/actions/setup
with:
os: ubuntu-latest
target_arch: ${{ matrix.arch }}
- name: Build CLI
run: |
cargo build --release --locked --package maa-cli --features vendored-openssl
cargo build --release --locked --package maa-cli --features git2/vendored-openssl
cp -v target/$CARGO_BUILD_TARGET/release/maa $GITHUB_WORKSPACE/install/maa
cargo build --release --locked --package maa-cli --no-default-features \
--features git2,vendored-openssl
--features git2,git2/vendored-openssl
cp -v target/$CARGO_BUILD_TARGET/release/maa $GITHUB_WORKSPACE/appimage-maa
working-directory: src/maa-cli
@@ -323,8 +327,8 @@ jobs:
cd install
tar czvf $GITHUB_WORKSPACE/release/MAA-${{ needs.meta.outputs.tag }}-linux-${{ matrix.arch }}.tar.gz .
- name: Upload MAA to Github
uses: actions/upload-artifact@v4
- name: Upload MAA to GitHub
uses: actions/upload-artifact@v6
with:
name: MAA-linux-${{ matrix.arch }}
path: |
@@ -332,78 +336,74 @@ jobs:
release/*.tar.gz
macOS-Core:
# Prevent duplicate runs on organization branches with PRs
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
name: Build Core for macOS
needs: meta
runs-on: macos-latest
runs-on: macos-26
strategy:
matrix:
arch: [arm64, x86_64]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
- name: Fetch submodules
run: |
git submodule update --init --depth 1 src/MaaUtils
# ninja 1.13.1 is already installed and up-to-date.
# - name: Install Dependencies
# - name: Install dependencies
# run: |
# brew install ninja
- name: Cache MaaDeps
id: cache-maadeps
uses: actions/cache@v4
uses: actions/cache@v5
continue-on-error: true
with:
path: ./MaaDeps
path: ./src/MaaUtils/MaaDeps
key: ${{ runner.os }}-${{ matrix.arch == 'x86_64' && 'x64' || 'arm64' }}-maadeps-${{ hashFiles('tools/maadeps-download.py') }}
- name: Bootstrap MaaDeps
run: |
[[ ${{ matrix.arch }} = "arm64" ]] && triplet="arm64-osx" || triplet="x64-osx"
python3 tools/maadeps-download.py ${triplet}
python3 tools/maadeps-download.py ${{ matrix.arch == 'x86_64' && 'x64' || 'arm64' }}-osx
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Config cmake
run: |
cmake -B build -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES='${{ matrix.arch }}' \
-DMAA_HASH_VERSION='${{ needs.meta.outputs.tag }}'
- name: Build
run: |
cmake --build build --config Release --parallel $(sysctl -n hw.logicalcpu)
cmake --build build --config RelWithDebInfo --parallel $(sysctl -n hw.logicalcpu)
- name: Install
run: |
cmake --install build --prefix install --config Release
cmake --install build --prefix install --config RelWithDebInfo
- name: Upload MAA to Github
uses: actions/upload-artifact@v4
- name: Upload MAA to GitHub
uses: actions/upload-artifact@v6
with:
name: MAACore-macos-${{ matrix.arch }}
path: "install/*.dylib"
macOS-GUI:
# Prevent duplicate runs on organization branches with PRs
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
name: Build GUI for macOS
needs: [meta, macOS-Core]
runs-on: macos-latest
runs-on: macos-26
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
- name: Install Dependencies
- name: Install dependencies
if: startsWith(github.ref, 'refs/tags/v')
run: |
brew install graphicsmagick imagemagick
@@ -413,47 +413,47 @@ jobs:
run: |
git submodule update --init --depth 1 src/MaaMacGui
- name: Download Arm64 MAA from Github
uses: actions/download-artifact@v5
- name: Download MAA (arm64) from GitHub
uses: actions/download-artifact@v7
with:
name: MAACore-macos-arm64
path: install-arm64
- name: Download x64 MAA from Github
uses: actions/download-artifact@v5
- name: Download MAA (x64) from GitHub
uses: actions/download-artifact@v7
with:
name: MAACore-macos-x86_64
path: install-x86_64
- name: Install Developer ID Certificate
- name: Install Developer ID certificate
if: startsWith(github.ref, 'refs/tags/v')
uses: apple-actions/import-codesign-certs@v5
uses: apple-actions/import-codesign-certs@v6
with:
p12-file-base64: ${{ secrets.HGUANDL_SIGN_CERT_P12 }}
p12-password: ${{ secrets.HGUANDL_SIGN_CERT_PASSWD }}
- name: Download Provisioning Profiles
- name: Download provisioning profiles
if: startsWith(github.ref, 'refs/tags/v')
uses: apple-actions/download-provisioning-profiles@v4
uses: apple-actions/download-provisioning-profiles@v5
with:
bundle-id: "com.hguandl.MeoAsstMac"
issuer-id: ${{ secrets.HGUANDL_APPSTORE_ISSUER }}
api-key-id: ${{ secrets.HGUANDL_APPSTORE_KEYID }}
api-private-key: ${{ secrets.HGUANDL_APPSTORE_KEY }}
- name: Setup Xcode Toolchain
if: true
- name: Setup Xcode toolchain
if: false
run: |
sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer
- name: Build Universal Binaries
- name: Build universal binaries
run: |
mkdir build
for LIB_NAME in $(ls install-arm64); do
lipo -create install-arm64/$LIB_NAME install-x86_64/$LIB_NAME -output build/$LIB_NAME
done
- name: Archive Runtime Files
- name: Archive runtime files
run: |
mkdir runtime && cd runtime
name='MAA-${{ needs.meta.outputs.tag }}-macos-runtime-universal'
@@ -465,8 +465,8 @@ jobs:
cd .. || exit 1
zip -yrX9 "$name.zip" "$name"
- name: Upload MAA runtime to Github
uses: actions/upload-artifact@v4
- name: Upload MAA runtime to GitHub
uses: actions/upload-artifact@v6
with:
name: MAA-macos-runtime-universal
path: runtime/MAA-${{ needs.meta.outputs.tag }}-macos-runtime-universal.zip
@@ -474,12 +474,13 @@ jobs:
- name: Build XCFramework
run: |
xcodebuild -create-xcframework -library libMaaCore.dylib -headers ../include -output MaaCore.xcframework
xcodebuild -create-xcframework -library libMaaUtils.dylib -output MaaUtils.xcframework
xcodebuild -create-xcframework -library libfastdeploy_ppocr.dylib -output fastdeploy_ppocr.xcframework
xcodebuild -create-xcframework -library libonnxruntime.*.dylib -output ONNXRuntime.xcframework
xcodebuild -create-xcframework -library libopencv*.dylib -output OpenCV.xcframework
working-directory: build
- name: Setup GUI Version
- name: Setup GUI version
run: |
RELEASE_COUNT=$(git ls-remote --tags origin | grep refs/tags/v | awk 'END{print NR}')
echo 'MARKETING_VERSION = ${{ needs.meta.outputs.tag }}' | tee src/MaaMacGui/Version.xcconfig
@@ -500,20 +501,20 @@ jobs:
xcodebuild -exportArchive -archivePath MAA.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath Export
working-directory: src/MaaMacGui
- name: Create Disk Image
- name: Create disk image
if: startsWith(github.ref, 'refs/tags/v')
run: |
create-dmg Export/MAA.app
mv MAA*.dmg MAA.dmg
working-directory: src/MaaMacGui
- name: Archive Debug Symbols
- name: Archive debug symbols
if: startsWith(github.ref, 'refs/tags/v')
run: |
ditto -c -k --keepParent MAA.app.dSYM MAA.app.dSYM.zip
working-directory: src/MaaMacGui/MAA.xcarchive/dSYMs
- name: Place Packages
- name: Place packages
if: startsWith(github.ref, 'refs/tags/v')
run: |
GIT_TAG=${{ needs.meta.outputs.tag }}
@@ -523,7 +524,7 @@ jobs:
mv src/MaaMacGui/MAA.dmg release/${APP_DMG}
mv src/MaaMacGui/MAA.xcarchive/dSYMs/MAA.app.dSYM.zip release/${APP_SYM}
- name: Notarize Image
- name: Notarize image
if: startsWith(github.ref, 'refs/tags/v')
uses: nick-fields/retry@v3
with:
@@ -539,34 +540,31 @@ jobs:
APPSTORE_KEY: ${{ secrets.HGUANDL_APPSTORE_KEY }}
ISSUER_ID: ${{ secrets.HGUANDL_APPSTORE_ISSUER }}
- name: Attach Notarization Tickets
- name: Attach notarization tickets
if: startsWith(github.ref, 'refs/tags/v')
run: |
dmg="MAA-${{ needs.meta.outputs.tag }}-macos-universal.dmg"
xcrun stapler staple ${dmg}
working-directory: release
- name: Upload MAA to Github
uses: actions/upload-artifact@v4
- name: Upload MAA to GitHub
uses: actions/upload-artifact@v6
with:
name: MAA-macos-universal
path: ${{ startsWith(github.ref, 'refs/tags/v') && 'release/MAA*' || 'src/MaaMacGui/MAA.xcarchive/**' }}
release:
# Prevent duplicate runs on organization branches with PRs
if: (github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name) && startsWith(github.ref, 'refs/tags/v')
name: Publish Release
if: startsWith(github.ref, 'refs/tags/v')
needs: [meta, windows, ubuntu, macOS-Core, macOS-GUI]
runs-on: ubuntu-latest
steps:
- name: Download MAA from Github
uses: actions/download-artifact@v5
- name: Download MAA from GitHub
uses: actions/download-artifact@v7
with:
path: assets
- name: Cleanup files
- name: Clean up files
run: |
mv -vf assets/changelog/* .
rm -rf assets/MAACore-macos-*
@@ -574,32 +572,35 @@ jobs:
# find . -type f | xargs mv -fvt .
find . -type f | while read f; do mv -fvt . $f; done
- name: Release to Github
uses: softprops/action-gh-release@v2.3.3
- name: Publish release to GitHub
uses: softprops/action-gh-release@v2.5.0
with:
body_path: CHANGELOG.md
files: |
assets/*
prerelease: ${{ needs.meta.outputs.prerelease != 'false' }}
- name: Trigger MirrorChyan
- name: Trigger release distribution workflows
run: |
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_release_note
gh workflow run --repo $GITHUB_REPOSITORY release-package-distribution.yml \
-f release_tag="${{ needs.meta.outputs.tag }}" \
-f mirrorchyan=true \
-f winget=${{ needs.meta.outputs.prerelease == 'false' }}
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_release_note.yml
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger secondary workflows # ref: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
- name: Trigger OTA release workflow # ref: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
run: |
gh workflow run --repo $GITHUB_REPOSITORY release-ota
gh workflow run --repo $GITHUB_REPOSITORY release-ota.yml
env:
GH_TOKEN: ${{ secrets.MISTEOWORKFLOW }}
- name: Create issue if failed
- name: Create issue on failure
if: failure()
uses: actions-cool/issues-helper@v3
with:
actions: "create-issue"
title: "Failed Release"
title: "Errors occured during release ${{ needs.meta.outputs.tag }}"
body: |
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

View File

@@ -1,57 +0,0 @@
name: "CodeQL MaaCore and MaaWpfGui Analysis"
on:
pull_request:
branches: ["dev"]
paths:
- "3rdparty/include/**"
- "include/**"
- "src/**"
- "cmake/**"
- "CMakeLists.txt"
- ".github/workflows/codeql-core.yml"
- "!**/*.md"
- "!**/*.xaml"
schedule:
- cron: "45 11 * * *" # Runs daily at 11:45 UTC
workflow_dispatch:
permissions:
actions: write
contents: read
packages: read
security-events: write
jobs:
analyze-manual:
name: Analyze MaaCore and MaaWpfGui
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
show-progress: false
- name: Setup CodeQL
uses: github/codeql-action/init@v3
with:
languages: c-cpp,csharp
build-mode: manual
- name: Run CodeQL
uses: github/codeql-action/analyze@v3
with:
category: "/language:multi-manual"
- name: Delete old caches
shell: pwsh
run: |
$oldCaches = gh cache list --key codeql --order asc --json key | ConvertFrom-Json | Select-Object -SkipLast 1
foreach ($cache in $oldCaches) {
if ($cache.key) {
Write-Host "Deleting cache: $($cache.key)"
gh cache delete $cache.key
}
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,36 +0,0 @@
name: "CodeQL Workflows Analysis"
on:
pull_request:
branches: ["dev"]
paths:
- ".github/**/*.yml"
schedule:
- cron: "00 12 * * *" # Runs daily at 12:00 UTC
workflow_dispatch:
permissions:
actions: write
contents: read
security-events: write
jobs:
analyze-workflows:
name: Analyze GitHub Workflows
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
show-progress: false
- name: Setup CodeQL for GitHub Actions
uses: github/codeql-action/init@v3
with:
languages: actions
build-mode: none
- name: Run CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:multi-none"

View File

@@ -1,4 +1,4 @@
name: Auto Close not reading issues or Fold checkboxes
name: Issue Review
on:
issues:
@@ -6,6 +6,7 @@ on:
jobs:
check-then-close-or-fold:
name: Review and Modify Issues
runs-on: ubuntu-latest
permissions:
issues: write
@@ -63,7 +64,7 @@ jobs:
}
}
- name: Check checkbox status
- name: Check for issue checkboxes
id: unread-checkbox-check
uses: actions/github-script@v8
with:
@@ -86,7 +87,7 @@ jobs:
'I have checked all the options without carefully reading the content and believe this will not affect issue resolution.'];
return texts.some(text => new RegExp(`- \\[x\\]\\s*${text}`).test(context.payload.issue.body));
- name: Close and lock issue
- name: Close low-quality issue
if: steps.unread-checkbox-check.outputs.result == 'true'
uses: actions/github-script@v8
with:

View File

@@ -1,4 +1,4 @@
name: "Issue Checker"
name: Issue Triage
on:
issues:
@@ -15,9 +15,11 @@ permissions:
jobs:
triage:
name: Triage Issues and PRs
runs-on: ubuntu-latest
steps:
- uses: MaaAssistantArknights/issue-checker@v1.14
- name: Label issues and PRs Automatically
uses: MaaAssistantArknights/issue-checker@v1.14
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/issue-checker.yml

View File

@@ -1,4 +1,4 @@
name: Check Dead Links
name: Markdown Link Check
on:
schedule:
@@ -7,22 +7,22 @@ on:
branches:
- dev
paths:
- "**/*.md"
- "docs/**"
- ".github/workflows/markdown-checker.yml"
- "docs/**"
- "**/*.md"
pull_request:
branches:
- dev
paths:
- "**/*.md"
- "docs/**"
- ".github/workflows/markdown-checker.yml"
- "docs/**"
- "**/*.md"
workflow_dispatch:
jobs:
check-links:
if: github.repository_owner == 'MaaAssistantArknights' && github.event.head_commit.author.email != '41898282+github-actions[bot]@users.noreply.github.com'
name: Check Dead Links
if: github.repository_owner == 'MaaAssistantArknights' && github.event.head_commit.author.email != '41898282+github-actions[bot]@users.noreply.github.com'
runs-on: ubuntu-latest
permissions:
pull-requests: write
@@ -30,19 +30,19 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
- name: Cache Primes
id: cache-primes
uses: actions/cache@v4
- name: Cache lychee responses
uses: actions/cache@v5
continue-on-error: true
with:
path: .lycheecache
key: lychee-cache
- name: Check dead links
- name: Check dead internal links
uses: lycheeverse/lychee-action@v2
with:
# 仅检查内部链接,排除所有外部链接

View File

@@ -1,71 +0,0 @@
name: mirrorchyan
on:
workflow_dispatch:
jobs:
mirrorchyan:
runs-on: macos-latest
steps:
- name: Upload MAA win x64
uses: MirrorChyan/uploading-action@v1
if: always()
with:
filetype: latest-release
filename: "*MAA-*-win-x64.zip"
mirrorchyan_rid: MAA
github_token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
upload_token: ${{ secrets.MirrorChyanUploadToken }}
os: win
arch: x64
- name: Upload MAA win arm64
uses: MirrorChyan/uploading-action@v1
if: always()
with:
filetype: latest-release
filename: "*MAA-*-win-arm64.zip"
mirrorchyan_rid: MAA
github_token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
upload_token: ${{ secrets.MirrorChyanUploadToken }}
os: win
arch: arm64
- name: Upload MAA macos arm64
uses: MirrorChyan/uploading-action@v1
if: always()
with:
filetype: latest-release
filename: "MAA-*-macos-universal.dmg"
extra_zip: true
mirrorchyan_rid: MAA
github_token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
upload_token: ${{ secrets.MirrorChyanUploadToken }}
os: macos
arch: arm64
- name: Upload MAA macos x64
uses: MirrorChyan/uploading-action@v1
if: always()
with:
filetype: latest-release
filename: "MAA-*-macos-universal.dmg"
extra_zip: true
mirrorchyan_rid: MAA
github_token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
upload_token: ${{ secrets.MirrorChyanUploadToken }}
os: macos
arch: x64

View File

@@ -1,5 +1,4 @@
name: mirrorchyan_release_note
name: Release Note Distribution
on:
workflow_dispatch:
release:
@@ -7,10 +6,11 @@ on:
jobs:
mirrorchyan:
name: Upload to MirrorChyan
runs-on: macos-latest
steps:
- name: Release Note for MAA
- name: Upload release notes to MirrorChyan
uses: MirrorChyan/release-note-action@v1
with:
mirrorchyan_rid: MAA

View File

@@ -1,14 +1,12 @@
name: Optimize PNG Templates
name: PNG Image Optimization
on:
push:
branches:
- "dev"
paths:
- "resource/**/*.png"
- "docs/.vuepress/public/images/**"
- "website/apps/web/public/**"
- "website/apps/web/src/assets/links/**"
- "resource/**/*.png"
workflow_dispatch:
inputs:
commit_message:
@@ -18,19 +16,21 @@ on:
jobs:
optimize-png:
name: Optimize PNG Images
# Skip workflow to prevent double consecutive runs
# Skip workflow on PR merges
if: github.repository_owner == 'MaaAssistantArknights' && ${{ github.event.head_commit.author.email != '41898282+github-actions[bot]@users.noreply.github.com' }}
if: github.repository_owner == 'MaaAssistantArknights' && github.event.head_commit.author.email != '41898282+github-actions[bot]@users.noreply.github.com'
runs-on: ubuntu-latest
steps:
- name: Check for direct push
# Skip workflow on PR merges
- name: Check if it is a direct push
id: check_push
run: |
if [[ "${{ github.event_name }}" != "workflow_dispatch" ]]; then
pr_merge_status=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.after }}/pulls" | xargs)
pr_count=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.after }}/pulls" \
| jq 'length')
if [[ "$pr_merge_status" == "[ ]" ]]; then
if [[ "$pr_count" == "0" ]]; then
echo "Direct push detected. Proceeding..."
echo "is_pr=False" >> $GITHUB_OUTPUT
else
@@ -44,7 +44,7 @@ jobs:
- name: Checkout repository
if: steps.check_push.outputs.is_pr != 'True'
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
show-progress: false
persist-credentials: false
@@ -59,6 +59,7 @@ jobs:
# id: cache_python
# if: steps.check_push.outputs.is_pr != 'True' && always()
# uses: actions/cache@v4
# continue-on-error: true
# with:
# path: ${{ env.pythonLocation }}/lib/python3.11/site-packages
# key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
@@ -75,7 +76,7 @@ jobs:
with:
crate: oxipng
- name: Run optimize_templates
- name: Optimize png images
if: steps.check_push.outputs.is_pr != 'True'
run: |
python3 tools/OptimizeTemplates/optimize_templates.py

View File

@@ -1,4 +1,4 @@
name: Auto Tag Release PR
name: Release Version Tagging
on:
pull_request:
@@ -15,22 +15,23 @@ on:
jobs:
auto_tag_release:
name: Tag Release
if: github.event.pull_request.merged == true && (startsWith(github.event.pull_request.title, 'Release v') || startsWith(github.event.pull_request.title, 'release v')) || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.MAARELEASE_RELEASE }}
- name: Git config
- name: Configure git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Extract tag name
- name: Determine tag name
id: extract_tag
run: |
if ${{ github.event_name != 'workflow_dispatch' }}; then
@@ -40,12 +41,12 @@ jobs:
echo "tag_name=${{ inputs.tag }}" >> $GITHUB_OUTPUT
fi
- name: Create release tag and push
- name: Create and push release tag
run: |
git tag -a "${{ steps.extract_tag.outputs.tag_name }}" -m "${{ steps.extract_tag.outputs.tag_name }}" -f
git push origin "${{ steps.extract_tag.outputs.tag_name }}"
- name: Merge into dev and push
- name: Merge tag into dev and push
run: |
git switch dev
git merge "${{ steps.extract_tag.outputs.tag_name }}"

View File

@@ -1,4 +1,4 @@
name: PR Checker
name: PR Commit Check
on:
pull_request_target:
@@ -6,10 +6,11 @@ on:
jobs:
check_commit_name_in_pr:
name: Check Commits in PR
if: ${{ !github.event.pull_request.merged && github.base_ref != 'master' }}
runs-on: ubuntu-latest
steps:
- name: Cleanup Previous Comment
- name: Clean up previous comment
uses: actions/github-script@v8
with:
script: |
@@ -27,7 +28,7 @@ jobs:
comment_id: previousComment.id
});
}
- name: Check Commits
- name: Check commits
uses: actions/github-script@v8
with:
script: |

View File

@@ -0,0 +1,36 @@
name: Scheduled Pre-commit
on:
schedule:
# 每天 UTC 21:00 运行(北京时间 5:00
- cron: "0 21 * * *"
workflow_dispatch: # 允许手动触发
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
show-progress: false
- name: Setup and run Prek
uses: j178/prek-action@v1
id: pre-commit
continue-on-error: true
with:
extra-args: '--all-files'
- name: Commit and push changes
if: steps.pre-commit.outcome == 'failure' && github.repository_owner == 'MaaAssistantArknights'
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "chore: Auto update by pre-commit hooks
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
[skip changelog]"
branch: ${{ github.ref }}

View File

@@ -1,4 +1,4 @@
name: release-nightly-ota
name: Release Pipeline (Nightly OTA)
on:
schedule:
@@ -26,6 +26,7 @@ on:
jobs:
build-win-nightly:
name: Build Nightly for Windows
if: github.repository_owner == 'MaaAssistantArknights'
runs-on: windows-latest
strategy:
@@ -38,7 +39,8 @@ jobs:
main_tag_name: ${{ steps.push_main_tag.outputs.main_tag_name }}
changelog: ${{ steps.read_changelog.outputs.content }}
steps:
- uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
# repository: 'MaaAssistantArknights/MaaAssistantArknights'
#ref: ${{ inputs.ref }}
@@ -51,6 +53,7 @@ jobs:
- name: Fetch submodules
run: |
git submodule update --init --depth 1 src/MaaUtils
git submodule update --init --depth 1 3rdparty/EmulatorExtras
- name: Checkout ref (if provided)
@@ -138,7 +141,7 @@ jobs:
gh run watch ${{ github.run_id }}
- name: Generate Changelog
- name: Generate changelog
id: generate_changelog
run: |
python3 tools/ChangelogGenerator/changelog_generator.py --latest "${{ steps.set_tag.outputs.latest_tag }}" --tag "${{ steps.set_tag.outputs.tag }}"
@@ -160,7 +163,7 @@ jobs:
gh run watch ${{ github.run_id }}
- name: Read Changelog to variable
- name: Read changelog to variable
id: read_changelog
uses: juliangruber/read-file-action@v1
with:
@@ -168,10 +171,11 @@ jobs:
- name: Cache MaaDeps
id: cache-maadeps
uses: actions/cache@v4
uses: actions/cache@v5
continue-on-error: true
with:
path: |
./MaaDeps
./src/MaaUtils/MaaDeps
key: ${{ runner.os }}-${{ matrix.arch }}-maadeps-${{ hashFiles('tools/maadeps-download.py') }}
- name: Bootstrap MaaDeps
@@ -184,20 +188,21 @@ jobs:
- name: Config cmake
run: |
mkdir -p build
cmake -B build ${{ matrix.arch == 'arm64' && '-A ARM64' }} -DCMAKE_BUILD_TYPE=Release -DMAADEPS_TRIPLET='maa-${{ matrix.arch }}-windows' -DINSTALL_RESOURCE=ON -DINSTALL_PYTHON=ON -DMAA_HASH_VERSION='${{ steps.set_tag.outputs.tag }}' -DBUILD_WPF_GUI=OFF
cmake -B build ${{ matrix.arch == 'arm64' && '-A ARM64' }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMAADEPS_TRIPLET='maa-${{ matrix.arch }}-windows' -DINSTALL_RESOURCE=ON -DINSTALL_PYTHON=ON -DMAA_HASH_VERSION='${{ steps.set_tag.outputs.tag }}' -DBUILD_WPF_GUI=OFF
- name: Build
run: |
cmake --build build --config Release --parallel $env:NUMBER_OF_PROCESSORS
cmake --build build --config RelWithDebInfo --parallel $env:NUMBER_OF_PROCESSORS
- name: Install
run: |
mkdir -p install
cmake --install build --prefix install --config Release
cmake --install build --prefix install --config RelWithDebInfo
- name: Cache .nuke/temp, ~/.nuget/packages
id: cache-nuget
uses: actions/cache@v4
uses: actions/cache@v5
continue-on-error: true
with:
path: |
.nuke/temp
@@ -208,7 +213,7 @@ jobs:
if: steps.cache-nuget.outputs.cache-hit != 'true'
run: dotnet restore src/MaaWpfGui/MaaWpfGui.csproj
- name: Taggify Version for csproj
- name: Taggify version for csproj
run: |
$csprojPath = "src/MaaWpfGui/MaaWpfGui.csproj"
$csprojPath = Resolve-Path -Path $csprojPath
@@ -228,19 +233,32 @@ jobs:
- name: Publish WPF GUI
run: |
dotnet publish src/MaaWpfGui/MaaWpfGui.csproj -c Release -o install
dotnet publish src/MaaWpfGui/MaaWpfGui.csproj -c Release -p:Platform=${{ matrix.arch == 'arm64' && 'ARM64' || 'x64' }} -o install
- name: Organize Install Files
- name: Collect PDB files
run: |
cp build/bin/RelWithDebInfo/*.pdb install/
Compress-Archive -Path install/*.pdb -DestinationPath install/MAAComponent-DebugSymbol-${{ steps.set_tag.outputs.tag }}-win-${{ matrix.arch }}.zip
continue-on-error: true
- name: Upload PDB files
uses: actions/upload-artifact@v6
with:
name: MAAComponent-DebugSymbol-win-${{ matrix.arch }}
path: install/MAAComponent-DebugSymbol-${{ steps.set_tag.outputs.tag }}-win-${{ matrix.arch }}.zip
- name: Organize install files
shell: bash
run: |
rm -rf install/MAAComponent-DebugSymbol-*.zip
rm -rf install/*.pdb
rm -rf install/msvc-debug
rm -rf install/*.h
cp tools/DependencySetup_依赖库安装.bat install
- name: Upload MAA to Github
uses: actions/upload-artifact@v4
- name: Upload MAA to GitHub
uses: actions/upload-artifact@v6
with:
name: MAA-win-${{ matrix.arch }}
path: install
@@ -257,12 +275,13 @@ jobs:
echo "main_tag_name=$main_tag_name" >> $env:GITHUB_OUTPUT
push-tag:
name: Push Tag to MaaRelease
if: github.repository_owner == 'MaaAssistantArknights'
needs: build-win-nightly
runs-on: ubuntu-latest
steps:
- name: Fetch MaaRelease
uses: actions/checkout@v5
- name: Checkout MaaRelease
uses: actions/checkout@v6
with:
repository: ${{ format('{0}/{1}', github.repository_owner, 'MaaRelease') }}
fetch-depth: 0
@@ -280,6 +299,7 @@ jobs:
git push --tags origin HEAD:refs/tags/${{ needs.build-win-nightly.outputs.tag }}
make-ota:
name: Build and Upload Nightly OTA for Windows
if: github.repository_owner == 'MaaAssistantArknights'
needs: [build-win-nightly, push-tag]
strategy:
@@ -287,24 +307,24 @@ jobs:
target: [x64]
runs-on: ubuntu-latest
steps:
- name: Echo tag version
- name: Show tag version
run: |
echo ${{ needs.build-win-nightly.outputs.tag }}
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
path: MaaAssistantArknights
token: ${{ secrets.MAARELEASE_RELEASE }}
show-progress: false
- name: Download MAA from Github
uses: actions/download-artifact@v5
- name: Download MAA from GitHub
uses: actions/download-artifact@v7
with:
name: MAA-win-${{ matrix.target }}
path: ${{ format('{0}/{1}', 'build-ota', needs.build-win-nightly.outputs.tag) }}
- name: Fetch release info
- name: Fetch release information
run: |
mkdir -pv build-ota && cd build-ota

View File

@@ -1,4 +1,4 @@
name: release-ota
name: Release Pipeline (OTA)
on:
release:
@@ -22,10 +22,11 @@ env:
jobs:
create-tag:
name: Create OTA Release Tag in MaaRelease
runs-on: ubuntu-latest
steps:
- name: Fetch MaaRelease
uses: actions/checkout@v5
- name: Checkout MaaRelease
uses: actions/checkout@v6
with:
show-progress: false
repository: ${{ format('{0}/{1}', github.repository_owner, 'MaaRelease') }}
@@ -33,7 +34,7 @@ jobs:
fetch-depth: 0
token: ${{ secrets.MAARELEASE_RELEASE }}
- name: Fetch release info
- name: Fetch release information
id: fetchReleaseInfo
run: |
mkdir -pv build-ota && cd build-ota
@@ -76,7 +77,7 @@ jobs:
PUSH_REMOTE: https://github-actions[bot]:${{ secrets.MAARELEASE_RELEASE }}@github.com/${{ github.repository_owner }}/MaaRelease
- name: Upload release config to GitHub
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: MaaReleaseConfig
path: ./build-ota/config
@@ -86,6 +87,7 @@ jobs:
release_tag: ${{ steps.fetchReleaseInfo.outputs.release_tag }}
make-ota:
name: Build and Upload OTA for Windows
needs: create-tag
runs-on: ubuntu-latest
strategy:
@@ -94,13 +96,13 @@ jobs:
- x64
steps:
- name: Download release config
uses: actions/download-artifact@v5
uses: actions/download-artifact@v7
with:
name: MaaReleaseConfig
path: ./MaaReleaseConfig
- name: Fetch MaaRelease
uses: actions/checkout@v5
- name: Checkout MaaRelease
uses: actions/checkout@v6
with:
show-progress: false
repository: ${{ format('{0}/{1}', github.repository_owner, 'MaaRelease') }}
@@ -108,8 +110,8 @@ jobs:
fetch-depth: 0
token: ${{ secrets.MAARELEASE_RELEASE }}
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
path: MaaAssistantArknights
@@ -137,20 +139,21 @@ jobs:
prerelease: ${{ fromJSON(needs.create-tag.outputs.prerelease) }}
overwrite: true
- name: Create issue if failed
- name: Create issue on failure
if: failure()
uses: actions-cool/issues-helper@v3
with:
actions: "create-issue"
title: "Failed make release OTA for Windows"
title: "Failed to make OTA release for Windows"
body: |
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
make-ota-mac:
name: Build and Upload OTA for macOS
needs: create-tag
runs-on: macos-14
steps:
- name: Fetch release info
- name: Fetch release information
run: gh release list --repo 'MaaAssistantArknights/MaaAssistantArknights' --limit ${{ inputs.limit || 31 }} | tee ./release_maa.txt
- name: Download release packages
@@ -166,7 +169,7 @@ jobs:
run: |
gh release download --repo 'sparkle-project/Sparkle' --clobber -O - -p 'Sparkle-*.tar.xz' | tar xf -
- name: Generate Update Packages
- name: Generate update packages
run: |
if [ $(head -n 1 release_maa.txt | awk '{ print $2 }') = 'Pre-release' ]; then
echo ${{ secrets.SPARKLE_PRIV_KEY }} | ./bin/generate_appcast --channel beta --ed-key-file - ./packages
@@ -174,7 +177,7 @@ jobs:
echo ${{ secrets.SPARKLE_PRIV_KEY }} | ./bin/generate_appcast --ed-key-file - ./packages
fi
- name: Cleanup files
- name: Clean up files
run: |
find ./packages -type f ! \( -name 'MAA-${{ needs.create-tag.outputs.release_tag }}-macos-universal.dmg' -o -name '*.delta' -o -name '*.xml' \) -print -delete
@@ -189,16 +192,17 @@ jobs:
prerelease: ${{ fromJSON(needs.create-tag.outputs.prerelease) }}
overwrite: true
- name: Create issue if failed
- name: Create issue on failure
if: failure()
uses: actions-cool/issues-helper@v3
with:
actions: "create-issue"
title: "Failed make release OTA for macos"
title: "Failed to make OTA release for macOS"
body: |
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
release:
name: Publish to Release Mirrors
needs:
- make-ota
- make-ota-mac

View File

@@ -0,0 +1,122 @@
name: Release Package Distribution
on:
workflow_dispatch:
inputs:
release_tag:
description: "Release Tag (empty for latest)"
type: string
required: false
default: ""
mirrorchyan:
description: "Upload to MirrorChyan"
type: boolean
required: false
default: true
winget:
description: "Upload to WinGet"
type: boolean
required: false
default: true
env:
RELEASE_TAG_RAW: ${{ github.event.inputs.release_tag || 'latest' }}
jobs:
meta:
name: Define Release Tag
if: ${{ github.repository_owner == 'MaaAssistantArknights' }}
runs-on: ubuntu-latest
outputs:
RELEASE_TAG: ${{ steps.define_release_tag.outputs.RELEASE_TAG }}
steps:
- name: Get latest release tag
id: get_latest
if: ${{ env.RELEASE_TAG_RAW == 'latest' }}
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
token: ${{ secrets.GITHUB_TOKEN }}
excludes: "draft"
- name: Define release tag
id: define_release_tag
run: |
if [ "${{ env.RELEASE_TAG_RAW }}" == "latest" ]; then
echo "RELEASE_TAG=${{ steps.get_latest.outputs.release }}" >> $GITHUB_OUTPUT
else
echo "RELEASE_TAG=${{ env.RELEASE_TAG_RAW }}" >> $GITHUB_OUTPUT
fi
mirrorchyan:
name: Upload to MirrorChyan
needs: meta
if: ${{ github.event.inputs.mirrorchyan == 'true' }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
include:
- os: win
arch: x64
filename: "*MAA-*-win-x64.zip"
extra_zip: false
- os: win
arch: arm64
filename: "*MAA-*-win-arm64.zip"
extra_zip: false
- os: macos
arch: arm64
filename: "MAA-*-macos-universal.dmg"
extra_zip: true
- os: macos
arch: x64
filename: "MAA-*-macos-universal.dmg"
extra_zip: true
env:
RELEASE_TAG: ${{ needs.meta.outputs.RELEASE_TAG }}
steps:
- name: Upload MAA ${{ matrix.os }} ${{ matrix.arch }}
uses: MirrorChyan/uploading-action@v1
continue-on-error: true
with:
filetype: latest-release
filename: ${{ matrix.filename }}
extra_zip: ${{ matrix.extra_zip }}
tag: ${{ env.RELEASE_TAG }}
mirrorchyan_rid: MAA
github_token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
upload_token: ${{ secrets.MirrorChyanUploadToken }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
winget:
name: Upload to WinGet
needs: meta
if: ${{ github.event.inputs.winget == 'true' }}
runs-on: windows-latest
continue-on-error: true
env:
RELEASE_TAG: ${{ needs.meta.outputs.RELEASE_TAG }}
steps:
- name: Upload MAA to WinGet
uses: vedantmgoyal9/winget-releaser@main
with:
identifier: MaaAssistantArknights.MaaAssistantArknights
version: ""
installers-regex: "-win-"
max-versions-to-keep: 0
release-tag: ${{ env.RELEASE_TAG }}
fork-user: MaaAssistantArknights
token: ${{ secrets.MAABOT_WINGET_TOKEN }}

View File

@@ -1,4 +1,4 @@
name: gen-changelog
name: Release Preparation
on:
pull_request:
@@ -9,18 +9,19 @@ on:
workflow_dispatch:
jobs:
gen:
generate-changelog:
name: Generate Changelog
# startsWith 表达式不区分大小写
if: github.event.pull_request.draft == false && startsWith(github.event.pull_request.title, 'Release v')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
show-progress: false
- name: Extract tag name
- name: Extract release information
id: extract_tag
env:
PR_BODY: ${{ format('{0}/{1}', runner.temp, 'output' ) }}
@@ -50,7 +51,7 @@ jobs:
echo 'Target PR: ${{ github.event.pull_request.html_url }}' >> $PR_BODY
echo '' >> $PR_BODY
echo '<details><summary>Debug info</summary>' >> $PR_BODY
echo '<details><summary>Debug information</summary>' >> $PR_BODY
echo '' >> $PR_BODY
echo '```' >> $PR_BODY
sed 's/=/: /1' $GITHUB_OUTPUT >> $PR_BODY
@@ -60,14 +61,14 @@ jobs:
cat $PR_BODY
- name: Generate Changelog
- name: Generate changelog
run: |
git switch dev
python3 tools/ChangelogGenerator/changelog_generator.py --tag "${{ steps.extract_tag.outputs.tag_name }}" --latest "${{ steps.extract_tag.outputs.latest }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add files to git
- name: Commit changes
run: |
git status
@@ -78,8 +79,8 @@ jobs:
commit_msg="docs: Auto Generate Changelog of Release ""${{ steps.extract_tag.outputs.tag_name }}"
git commit -m "$commit_msg"
- name: Create PR
uses: peter-evans/create-pull-request@v7
- name: Create changelog PR
uses: peter-evans/create-pull-request@v8
with:
sign-commits: true
token: ${{ secrets.GITHUB_TOKEN }}
@@ -93,7 +94,18 @@ jobs:
assignees: |
AnnAngela
- name: Add reviewers to release PR
- name: Assign reviewers to release PR
uses: kentaro-m/auto-assign-action@v2.0.0
with:
configuration-path: ".github/release_reviewers.yaml"
update-submodules:
name: Update Submodules
if: github.event.pull_request.draft == false && startsWith(github.event.pull_request.title, 'Release v')
runs-on: ubuntu-latest
steps:
- name: Trigger submodule update workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run --repo $GITHUB_REPOSITORY update-submodules.yml

View File

@@ -1,4 +1,4 @@
name: Resource Updater
name: Game Resource Update
on:
schedule:
@@ -12,11 +12,12 @@ on:
jobs:
clone-resources-official:
name: Download Official Resources
if: github.repository_owner == 'MaaAssistantArknights'
runs-on: ubuntu-latest
steps:
- name: Clone ArknightsGameResource for Official
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
show-progress: false
repository: yuanyan3060/ArknightsGameResource
@@ -35,19 +36,20 @@ jobs:
/gamedata/excel/roguelike_topic_table.json
/gamedata/excel/activity_table.json
- name: Upload Official
uses: actions/upload-artifact@v4
- name: Upload Official resources
uses: actions/upload-artifact@v6
with:
name: official
path: ./Official
compression-level: 0
clone-resources-overseas:
name: Download Overseas Resources
if: github.repository_owner == 'MaaAssistantArknights'
runs-on: ubuntu-latest
steps:
- name: Clone ArknightsGameResource_Yostar for Overseas
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
show-progress: false
repository: ArknightsAssets/ArknightsGamedata
@@ -77,25 +79,25 @@ jobs:
/kr/gamedata/excel/roguelike_topic_table.json
/kr/gamedata/excel/activity_table.json
- name: Upload Official
uses: actions/upload-artifact@v4
- name: Upload Overseas resources
uses: actions/upload-artifact@v6
with:
name: overseas
path: ./Overseas
compression-level: 0
clone-resources-txwy:
name: Download Taiwan Resources
if: github.repository_owner == 'MaaAssistantArknights'
runs-on: ubuntu-latest
steps:
- name: Clone arknights-toolbox-update for Taiwan
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
show-progress: false
repository: arkntools/arknights-toolbox-update
ref: data-tw
repository: arkntools/arknights-data-tw-for-maa
ref: main
path: ./excel
token: ${{ secrets.ARKNTOOLS_MAA_RESOURCE_UPDATER}}
- name: Download stages.json from Penguin Stats
run: |
@@ -105,34 +107,45 @@ jobs:
parameters=("CN" "US" "JP" "KR")
pids=()
for param in "${parameters[@]}"; do
{
if curl -s -o "stages_${param}.json" "${baseUrl}${param}"; then
if curl -f -s -o "stages_${param}.json" "${baseUrl}${param}"; then
echo "Successfully fetched data for ${param}"
else
echo "Failed to fetch data for ${param}" >&2
exit 1
fi
} &
pids+=($!)
done
wait
- name: Upload Official
uses: actions/upload-artifact@v4
failed=0
for pid in "${pids[@]}"; do
if ! wait "$pid"; then
failed=1
fi
done
if [ $failed -ne 0 ]; then
echo "One or more downloads failed" >&2
exit 1
fi
- name: Upload Taiwan resources
uses: actions/upload-artifact@v6
with:
name: txwy
path: ./excel
compression-level: 0
update-game-resources:
# In case of rate limitations on the runners/instances, add dependency, by removing the comment
# needs: [clone-resources-official, clone-resources-overseas, clone-resources-txwy]
name: Update Game Resources
if: github.repository_owner == 'MaaAssistantArknights'
runs-on: macos-latest
steps:
- name: Checkout MAA
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
# TL;DR https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/9872#issuecomment-2251378371
# actions/checkout uses ${{ secrets.GITHUB_TOKEN }} by default, meaning all steps will inherit it
@@ -140,9 +153,14 @@ jobs:
show-progress: false
fetch-depth: 3
- name: Fetch submodules
run: |
git submodule update --init --depth 1 src/MaaUtils
- name: Restore ResourceUpdater from cache
id: resupd-cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
continue-on-error: true
with:
key: ResourceUpdater-${{ runner.os }}-${{ hashFiles('tools/ResourceUpdater/main.cpp') }}
path: |
@@ -152,10 +170,11 @@ jobs:
- name: Cache MaaDeps
if: steps.resupd-cache.outputs.cache-hit != 'true'
id: maadeps-cache
uses: actions/cache@v4
uses: actions/cache@v5
continue-on-error: true
with:
path: |
./MaaDeps
./src/MaaUtils/MaaDeps
key: ${{ runner.os }}-arm64-maadeps-${{ hashFiles('tools/maadeps-download.py') }}
- name: Bootstrap MaaDeps
@@ -187,78 +206,47 @@ jobs:
- name: Save ResourceUpdater to cache
if: always() && steps.resupd-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@v5
continue-on-error: true
with:
key: ResourceUpdater-${{ runner.os }}-${{ hashFiles('tools/ResourceUpdater/main.cpp') }}
path: |
./tools/ResourceUpdater/libopencv_world4.4.11.0.dylib
./tools/ResourceUpdater/res_updater
- name: Download txwy
id: download-txwy
uses: actions/download-artifact@v5
continue-on-error: true
- name: Wait for resource cloning
uses: yogeshlonkar/wait-for-jobs@v0
with:
name: txwy
path: ./tools/ResourceUpdater/Overseas/tw/gamedata/excel
ignore-skipped: 'false'
jobs: |
Download Official Resources
Download Overseas Resources
Download Taiwan Resources
ttl: 15
- name: Delay txwy
if: steps.download-txwy.outcome == 'failure'
run: |
sleep 10
- name: Re-download txwy
if: steps.download-txwy.outcome == 'failure'
uses: actions/download-artifact@v5
- name: Download txwy
uses: actions/download-artifact@v7
with:
name: txwy
path: ./tools/ResourceUpdater/Overseas/tw/gamedata/excel
- name: Download Overseas
id: download-overseas
uses: actions/download-artifact@v5
continue-on-error: true
with:
name: overseas
path: ./tools/ResourceUpdater/Overseas
- name: Delay Overseas
if: steps.download-overseas.outcome == 'failure'
run: |
sleep 10
- name: Re-download Overseas
if: steps.download-overseas.outcome == 'failure'
uses: actions/download-artifact@v5
uses: actions/download-artifact@v7
with:
name: overseas
path: ./tools/ResourceUpdater/Overseas
- name: Download Official
id: download-official
uses: actions/download-artifact@v5
continue-on-error: true
uses: actions/download-artifact@v7
with:
name: official
path: ./tools/ResourceUpdater/Official
- name: Delay Official
if: steps.download-official.outcome == 'failure'
run: |
sleep 10
- name: Re-download Official
if: steps.download-official.outcome == 'failure'
uses: actions/download-artifact@v5
with:
name: official
path: ./tools/ResourceUpdater/Official
- name: Run Resource Updater
- name: Update resources
run: |
./tools/ResourceUpdater/res_updater
- name: Task Sorting
- name: Sort tasks
id: task_sorting
run: |
python3 tools/TaskSorter/TaskSorter.py
@@ -272,7 +260,7 @@ jobs:
- name: Update version.json date if necessary
id: update_version
run: |
./tools/ResourceUpdater/version.zsh
sh ./tools/ResourceUpdater/version.sh
- name: Setup python
if: steps.update_version.outputs.contains_png == 'True'
@@ -280,10 +268,11 @@ jobs:
with:
python-version: "3.11"
- name: Cache Python packages
- name: Cache python packages
if: always() && steps.update_version.outputs.contains_png == 'True'
id: cache_python
uses: actions/cache@v4
uses: actions/cache@v5
continue-on-error: true
with:
path: ${{ env.pythonLocation }}/Lib/site-packages
key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
@@ -299,12 +288,12 @@ jobs:
with:
crate: oxipng
- name: Run optimize_templates
- name: Optimize png images
if: steps.update_version.outputs.contains_png == 'True'
run: |
python3 tools/OptimizeTemplates/optimize_templates.py -p resource/template/items/ resource/template/infrast/
- name: Add files to git
- name: Commit changes
if: steps.update_version.outputs.changes == 'True'
id: add_files
run: |
@@ -349,4 +338,42 @@ jobs:
# - name: Release # ref: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
# if: steps.add_files.outputs.have_commits == 'True'
# run: |
# gh workflow run release-nightly-ota -f release_body="Auto Release of Resource Updates"
# gh workflow run release-nightly-ota.yml -f release_body="Auto Release of Resource Updates"
- name: Upsert failure comment (single active)
if: failure() && github.ref == 'refs/heads/dev'
run: |
run_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
latest_id=$(gh api --paginate repos/${{ github.repository }}/issues/14493/comments | jq -r '.[] | select(.user.login=="github-actions[bot]") | .id' | tail -n 1)
if [ -n "$latest_id" ]; then
body=$(gh api repos/${{ github.repository }}/issues/comments/$latest_id --jq '.body')
if echo "$body" | grep -q '/actions/runs/'; then
# Count existing run URLs
count=$(echo "$body" | grep -o 'https://github.com/[^[:space:]]*' | wc -l)
# Collapse existing content
old_content=$(echo "$body" | sed 's|https://github.com/[^[:space:]]*|<details>\n<summary>⚠️ Previous failures ('"$count"')</summary>\n\n###### &\n\n</details>|g')
new_body="$run_url
@MistEO @ABA2396 @Constrat
$old_content"
gh api repos/${{ github.repository }}/issues/comments/$latest_id -X PATCH -f body="$new_body" || echo "Patch failed"
exit 0
fi
fi
# Create new failure comment if none suitable
gh issue comment 14493 -R ${{ github.repository }} --body "$run_url
@MistEO @ABA2396 @Constrat"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Minimize failure comment on success/cancelled
if: ${{ !failure() && github.ref == 'refs/heads/dev' }}
run: |
latest_node=$(gh api --paginate repos/${{ github.repository }}/issues/14493/comments | jq -r '.[] | select(.user.login=="github-actions[bot]") | .node_id' | tail -n 1)
if [ -n "$latest_node" ]; then
gh api graphql -f query='mutation { minimizeComment(input: {subjectId: "'"$latest_node"'", classifier: OUTDATED}) { minimizedComment { isMinimized } } }' || true
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,58 +1,67 @@
name: smoke-testing
name: Smoke Test
permissions:
contents: read
on:
push:
paths:
- ".github/workflows/smoke-testing.yml"
- "3rdparty/include/**"
- "include/**"
- "src/Cpp/**"
- "src/MaaCore/**"
- "resource/**"
- "!**/*.md"
- "cmake/**"
- "CMakeLists.txt"
- "include/**"
- "resource/**"
- "src/Cpp/**"
- "src/MaaCore/**"
- "tools/maadeps-download.py"
- "tools/SmokeTesting/**"
- "!**/*.md"
pull_request:
paths:
- ".github/workflows/smoke-testing.yml"
- "3rdparty/include/**"
- "include/**"
- "src/Cpp/**"
- "src/MaaCore/**"
- "resource/**"
- "!**/*.md"
- "cmake/**"
- "CMakeLists.txt"
- "include/**"
- "resource/**"
- "src/Cpp/**"
- "src/MaaCore/**"
- "tools/maadeps-download.py"
- "tools/SmokeTesting/**"
- "!**/*.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.head_ref || github.ref_name }}${{ github.ref == 'refs/heads/dev' && format('-{0}', github.sha) || '' }}
cancel-in-progress: true
jobs:
smoke-testing:
# Prevent duplicate runs on organization branches with PRs
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name !=
github.event.pull_request.base.repo.full_name
name: Run Smoke Test
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
- name: Generate cache key
id: cache_key
continue-on-error: true
run: |
echo "key=Smoke-testing-${{ hashFiles('src/Cpp/**', 'src/MaaCore/**', '3rdparty/include/**', 'include/**', 'cmake/**', 'CMakeLists.txt', 'tools/maadeps-download.py', 'tools/linux-toolchain-download.py') }}" >> $GITHUB_OUTPUT
- name: Restore cache smoke-testing
- name: Restore cache for Smoke Test
if: ${{ steps.cache_key.outputs.key != '' }}
id: smoke-cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
continue-on-error: true
with:
key: ${{ steps.cache_key.outputs.key }}
path: |
./install/libfastdeploy_ppocr.dylib
./install/libMaaCore.dylib
./install/libMaaUtils.dylib
./install/libonnxruntime.1.19.2.dylib
./install/libopencv_world4.4.11.0.dylib
./install/smoke_test
@@ -60,14 +69,15 @@ jobs:
- name: Fetch submodules
if: steps.smoke-cache.outputs.cache-hit != 'true'
run: |
git submodule update --init --depth 1 3rdparty/EmulatorExtras
git submodule update --init --depth 1 src/MaaUtils
- name: Cache MaaDeps
if: steps.smoke-cache.outputs.cache-hit != 'true'
id: maadeps-cache
uses: actions/cache@v4
uses: actions/cache@v5
continue-on-error: true
with:
path: ./MaaDeps
path: ./src/MaaUtils/MaaDeps
key: ${{ runner.os }}-arm64-maadeps-${{ hashFiles('tools/maadeps-download.py') }}
- name: Bootstrap MaaDeps
@@ -99,30 +109,32 @@ jobs:
mkdir -p install
cmake --install build --prefix install --config Debug
- name: Make link for cache smoke-testing
- name: Make link to Smoke Test cache
if: steps.smoke-cache.outputs.cache-hit == 'true'
run: |
ln -s "$(pwd)/resource" install/resource
- name: Run tests
run: |
./tools/SmokeTesting/run_tests.zsh
sh ./tools/SmokeTesting/run_tests.sh
- name: Save cache smoke-testing (only in dev)
- name: Save cache for Smoke Test (only in dev)
if: steps.smoke-cache.outputs.cache-hit != 'true' && github.ref == 'refs/heads/dev'
uses: actions/cache/save@v4
uses: actions/cache/save@v5
continue-on-error: true
with:
key: ${{ steps.cache_key.outputs.key }}
path: |
./install/libfastdeploy_ppocr.dylib
./install/libMaaCore.dylib
./install/libMaaUtils.dylib
./install/libonnxruntime.1.19.2.dylib
./install/libopencv_world4.4.11.0.dylib
./install/smoke_test
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: logs
path: ./install/debug

View File

@@ -1,4 +1,4 @@
name: "Inactive Issues Closer"
name: Issue Staleness Management
on:
schedule:
@@ -11,6 +11,7 @@ env: # config
jobs:
stale:
name: Handle Stale Issues
if: github.repository_owner == 'MaaAssistantArknights'
runs-on: ubuntu-latest
permissions:
@@ -20,7 +21,7 @@ jobs:
pull-requests: none
contents: none
steps:
- name: Close inactive issues
- name: Handle stale issues
uses: actions/stale@v10
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,33 +1,34 @@
name: sync-resource
name: Resource Sync
on:
push:
branches:
- dev
paths:
- "resource/**"
- ".github/workflows/sync-resource.yml"
- "resource/**"
workflow_dispatch:
jobs:
sync-resource:
name: Sync Resource to MaaResource
if: github.repository_owner == 'MaaAssistantArknights'
runs-on: ubuntu-latest
steps:
- name: Checkout MaaAssistantArknights
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
- name: Setup Git
- name: Configure git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git show -s
- name: Checkout MaaResource
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: MaaAssistantArknights/MaaResource
show-progress: false

33
.github/workflows/update-submodules.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Submodule Update
on:
schedule:
- cron: "50 21 * * *" # Runs daily at 21:50 UTC (before `Release Pipeline (Nightly OTA)`)
workflow_dispatch:
jobs:
update-submodules:
name: Update Submodules
runs-on: ubuntu-latest
if: github.repository_owner == 'MaaAssistantArknights'
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: true
- name: Update submodules
run: |
git submodule update --remote src/MaaMacGui
git submodule update --remote src/maa-cli
- name: Commit and push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "feat: Update Submodules MaaMacGui, maa-cli
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
[skip changelog]"
branch: ${{ github.ref }}

View File

@@ -1,4 +1,4 @@
name: MaaWebsite Workflow
name: Documentation Site
on:
push:
@@ -24,48 +24,51 @@ concurrency:
group: "pages"
cancel-in-progress: false
permissions:
# required for peaceiris/actions-gh-pages
contents: write
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
package_json_file: "./docs/package.json"
run_install: false
- name: Setup Node.js environment
uses: actions/setup-node@v5
- name: Setup node.js environment
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
cache-dependency-path: "./docs/pnpm-lock.yaml"
- name: Install dependencies
- name: Install node modules
run: pnpm install --frozen-lockfile
working-directory: "./docs"
- name: Build documentation
- name: Build
run: pnpm run build
working-directory: "./docs"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Upload artifact to GitHub
uses: actions/upload-artifact@v6
with:
name: dist
path: "./docs/.vuepress/dist"
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: ${{ inputs.deploy-to-prod == true || github.ref == 'refs/heads/master' }}
if: github.repository_owner == 'MaaAssistantArknights' && (inputs.deploy-to-prod == true || github.ref == 'refs/heads/master')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: "./docs/.vuepress/dist"

3
.gitignore vendored
View File

@@ -457,7 +457,8 @@ tools/RoguelikeRecruitmentTool/output
.lycheecache
# MaaDeps
/MaaDeps/*
MaaDeps
src/MaaUtils/*
# ResourceUpdater workflow
/original/*

3
.gitmodules vendored
View File

@@ -10,3 +10,6 @@
[submodule "3rdparty/EmulatorExtras"]
path = 3rdparty/EmulatorExtras
url = https://github.com/MaaXYZ/EmulatorExtras.git
[submodule "src/MaaUtils"]
path = src/MaaUtils
url = https://github.com/MaaXYZ/MaaUtils

View File

@@ -1,39 +1,45 @@
default_install_hook_types: [pre-commit, prepare-commit-msg]
ci:
autofix_commit_msg: "chore: Auto update by pre-commit hooks [skip changelog]"
autofix_prs: true
repos:
- repo: https://github.com/shssoichiro/oxipng
rev: v9.1.4
rev: v10.0.0
hooks:
- id: oxipng
name: PNG Image Compression
args: ["-q", "-o", "2", "-s", "--ng"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.0
rev: v21.1.8
hooks:
- id: clang-format
name: Clang-Format (MaaCore)
files: ^src/MaaCore/.*
args: ["--assume-filename", ".clang-format"]
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.5.3
rev: v3.7.4
hooks:
- id: prettier
name: prettier (config files)
name: Prettier (Config Files)
files: ^((\.github/ISSUE_TEMPLATE|resource|src|tools)/.*|\.pre-commit-config\.yaml|package-definition\.json)
types_or:
- yaml
- json
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.5.3
hooks:
- id: prettier
name: prettier (docs)
name: Prettier (Documentation)
files: ^docs/.*
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff-format
name: Ruff format (Python)
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.17.2
rev: v0.18.1
hooks:
- id: markdownlint-cli2
name: MarkdownLint (Documentation)
files: ^docs/.*|^README\.md$
types:
- markdown
args: ["--fix", "--config", "docs/.markdownlint.yaml", "#**/node_modules"]
args: ["--fix", "--config", "docs/.markdownlint.yaml"]

View File

@@ -1,18 +1,12 @@
**/node_modules/
**/pnpm-lock.yaml
docs/**/*.md
MaaDeps/
3rdparty/
src/maa-cli
src/MaaMacGui
# website/
# docs/
src/MaaUtils
resource/Arknights-Tile-Pos/
tools/OptimizeTemplates/optimize_templates.json
CITATION.cff
CHANGELOG.md
## FUCK FUCK

View File

@@ -115,15 +115,15 @@ static constexpr double rel_pos_x = 1.3143386840820312;
static constexpr double rel_pos_y = 1.314337134361267;
static constexpr double rel_pos_z = -0.3967874050140381;
inline auto get_retreat_screen_pos(const Level& level)
inline auto get_retreat_screen_pos(const Level& level, bool has_multi_stages = false)
{
const vec3d relative_pos = { -rel_pos_x, +rel_pos_y, rel_pos_z };
const vec3d relative_pos = { -rel_pos_x + (has_multi_stages ? level.view[0].x : 0), +rel_pos_y, rel_pos_z };
return world_to_screen(level, relative_pos, true);
}
inline auto get_skill_screen_pos(const Level& level)
inline auto get_skill_screen_pos(const Level& level, bool has_multi_stages = false)
{
const vec3d relative_pos = { +rel_pos_x, -rel_pos_y, rel_pos_z };
const vec3d relative_pos = { +rel_pos_x + (has_multi_stages ? level.view[0].x : 0), -rel_pos_y, rel_pos_z };
return world_to_screen(level, relative_pos, true);
}

View File

@@ -1,688 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include <initializer_list>
#include <optional>
#include <ostream>
#include <string>
#include <tuple>
#include <type_traits>
#include <vector>
#include "exception.hpp"
#include "utils.hpp"
namespace json
{
template <typename string_t>
class basic_array
{
friend class basic_value<string_t>;
friend class basic_object<string_t>;
public:
using raw_array = std::vector<basic_value<string_t>>;
using value_type = typename raw_array::value_type;
using iterator = typename raw_array::iterator;
using const_iterator = typename raw_array::const_iterator;
using reverse_iterator = typename raw_array::reverse_iterator;
using const_reverse_iterator = typename raw_array::const_reverse_iterator;
using char_t = typename string_t::value_type;
public:
basic_array() = default;
basic_array(const basic_array<string_t>& rhs) = default;
basic_array(basic_array<string_t>&& rhs) noexcept = default;
basic_array(std::initializer_list<value_type> init_list);
basic_array(typename raw_array::size_type size);
// explicit basic_array(const basic_value<string_t>& val);
// explicit basic_array(basic_value<string_t>&& val);
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_to_json_in_templ_spec<jsonization_t, string_t>::value
&& !_utils::has_to_json_array_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
basic_array(const jsonization_t& value)
: basic_array(ext::jsonization<string_t, jsonization_t>().to_json(value))
{
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_to_json_array_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
basic_array(const jsonization_t& value)
: basic_array(ext::jsonization<string_t, jsonization_t>().to_json_array(value))
{
}
template <
typename jsonization_t,
std::enable_if_t<
std::is_rvalue_reference_v<jsonization_t&&>
&& _utils::has_move_to_json_in_templ_spec<jsonization_t, string_t>::value
&& !_utils::has_move_to_json_array_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
basic_array(jsonization_t&& value)
: basic_array(ext::jsonization<string_t, jsonization_t>().move_to_json(std::move(value)))
{
}
//template <
// typename jsonization_t,
// std::enable_if_t<
// std::is_rvalue_reference_v<jsonization_t&&>
// && _utils::has_move_to_json_array_in_templ_spec<jsonization_t, string_t>::value,
// bool> = true>
//basic_array(jsonization_t&& value)
// : basic_array(
// ext::jsonization<string_t, jsonization_t>().move_to_json_array(std::move(value)))
//{
//}
~basic_array() noexcept = default;
bool empty() const noexcept { return _array_data.empty(); }
size_t size() const noexcept { return _array_data.size(); }
bool contains(size_t pos) const { return pos < _array_data.size(); }
bool exists(size_t pos) const { return contains(pos); }
const basic_value<string_t>& at(size_t pos) const;
string_t dumps(std::optional<size_t> indent = std::nullopt) const
{
return indent ? format(*indent) : to_string();
}
string_t to_string() const;
string_t format(size_t indent = 4) const { return format(indent, 0); }
template <typename value_t>
bool all() const;
template <typename value_t, template <typename...> typename collection_t = std::vector>
collection_t<value_t> as_collection() const;
template <
typename value_t,
size_t Size,
template <typename, size_t> typename fixed_array_t = std::array>
fixed_array_t<value_t, Size> as_fixed_array() const;
template <typename... elem_ts>
std::tuple<elem_ts...> as_tuple() const;
template <typename first_t, typename second_t>
std::pair<first_t, second_t> as_pair() const;
template <
typename value_t,
std::enable_if_t<
_utils::has_from_json_array_in_templ_spec<value_t, string_t>::value,
bool> = true>
value_t as() const&
{
value_t res;
ext::jsonization<string_t, value_t>().from_json_array(*this, res);
return res;
}
template <
typename value_t,
std::enable_if_t<
_utils::has_move_from_json_array_in_templ_spec<value_t, string_t>::value,
bool> = true>
value_t as() &&
{
value_t res;
ext::jsonization<string_t, value_t>().move_from_json_array(std::move(*this), res);
return res;
}
// Usage: get(key_1, key_2, ..., default_value);
template <typename... key_then_default_value_t>
auto get(key_then_default_value_t&&... keys_then_default_value) const;
template <typename value_t = basic_value<string_t>>
std::optional<value_t> find(size_t pos) const;
template <typename... args_t>
decltype(auto) emplace_back(args_t&&... args);
template <typename... args_t>
decltype(auto) push_back(args_t&&... args);
void clear() noexcept;
bool erase(size_t pos);
bool erase(iterator iter);
iterator begin() noexcept;
iterator end() noexcept;
const_iterator begin() const noexcept;
const_iterator end() const noexcept;
const_iterator cbegin() const noexcept;
const_iterator cend() const noexcept;
reverse_iterator rbegin() noexcept;
reverse_iterator rend() noexcept;
const_reverse_iterator rbegin() const noexcept;
const_reverse_iterator rend() const noexcept;
const_reverse_iterator crbegin() const noexcept;
const_reverse_iterator crend() const noexcept;
const basic_value<string_t>& operator[](size_t pos) const;
basic_value<string_t>& operator[](size_t pos);
basic_array<string_t> operator+(const basic_array<string_t>& rhs) const&;
basic_array<string_t> operator+(basic_array<string_t>&& rhs) const&;
basic_array<string_t> operator+(const basic_array<string_t>& rhs) &&;
basic_array<string_t> operator+(basic_array<string_t>&& rhs) &&;
basic_array<string_t>& operator+=(const basic_array<string_t>& rhs);
basic_array<string_t>& operator+=(basic_array<string_t>&& rhs);
basic_array<string_t>& operator=(const basic_array<string_t>&) = default;
basic_array<string_t>& operator=(basic_array<string_t>&&) noexcept = default;
template <
typename value_t,
std::enable_if_t<std::is_convertible_v<value_t, basic_array<string_t>>, bool> = true>
basic_array<string_t>& operator=(value_t rhs)
{
return *this = basic_array<string_t>(std::move(rhs));
}
bool operator==(const basic_array<string_t>& rhs) const;
bool operator!=(const basic_array<string_t>& rhs) const { return !(*this == rhs); }
template <
typename value_t,
template <typename...> typename collection_t = std::vector,
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
explicit operator collection_t<value_t>() const
{
return as_collection<value_t, collection_t>();
}
template <
typename value_t,
size_t Size,
template <typename, size_t> typename fixed_array_t = std::array,
std::enable_if_t<_utils::is_fixed_array<fixed_array_t<value_t, Size>>, bool> = true>
explicit operator fixed_array_t<value_t, Size>() const
{
return as<fixed_array_t<value_t, Size>>();
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value
&& !_utils::has_from_json_array_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
explicit operator jsonization_t() const&
{
jsonization_t dst {};
if (!ext::jsonization<string_t, jsonization_t>().from_json(*this, dst)) {
throw exception("Wrong JSON");
}
return dst;
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_from_json_array_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
explicit operator jsonization_t() const&
{
jsonization_t dst {};
if (!ext::jsonization<string_t, jsonization_t>().from_json_array(*this, dst)) {
throw exception("Wrong JSON");
}
return dst;
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_move_from_json_in_templ_spec<jsonization_t, string_t>::value
&& !_utils::has_move_from_json_array_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
explicit operator jsonization_t() &&
{
jsonization_t dst {};
if (!ext::jsonization<string_t, jsonization_t>().from_json(std::move(*this), dst)) {
throw exception("Wrong JSON");
}
return dst;
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_move_from_json_array_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
explicit operator jsonization_t() &&
{
jsonization_t dst {};
if (!ext::jsonization<string_t, jsonization_t>().move_from_json_array(
std::move(*this),
dst)) {
throw exception("Wrong JSON");
}
return dst;
}
private:
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
auto
get(std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const;
template <typename value_t, typename... rest_keys_t>
auto get_helper(const value_t& default_value, size_t pos, rest_keys_t&&... rest) const;
template <typename value_t>
auto get_helper(const value_t& default_value, size_t pos) const;
string_t format(size_t indent, size_t indent_times) const;
private:
raw_array _array_data;
};
template <typename string_t>
inline basic_array<string_t>::basic_array(std::initializer_list<value_type> init_list)
: _array_data(init_list)
{
}
template <typename string_t>
inline basic_array<string_t>::basic_array(typename raw_array::size_type size)
: _array_data(size)
{
}
// template <typename string_t>
// inline basic_array<string_t>::basic_array(const basic_value<string_t>& val) :
// basic_array<string_t>(val.as_array())
//{}
//
// template <typename string_t>
// inline basic_array<string_t>::basic_array(basic_value<string_t>&& val)
// : basic_array<string_t>(std::move(val.as_array()))
//{}
template <typename string_t>
inline void basic_array<string_t>::clear() noexcept
{
_array_data.clear();
}
template <typename string_t>
inline bool basic_array<string_t>::erase(size_t pos)
{
return erase(_array_data.begin() + pos);
}
template <typename string_t>
inline bool basic_array<string_t>::erase(iterator iter)
{
return _array_data.erase(iter) != _array_data.end();
}
template <typename string_t>
template <typename... args_t>
inline decltype(auto) basic_array<string_t>::emplace_back(args_t&&... args)
{
static_assert(
std::is_constructible_v<value_type, args_t...>,
"Parameter can't be used to construct a raw_array::value_type");
return _array_data.emplace_back(std::forward<args_t>(args)...);
}
template <typename string_t>
template <typename... args_t>
inline decltype(auto) basic_array<string_t>::push_back(args_t&&... args)
{
return emplace_back(std::forward<args_t>(args)...);
}
template <typename string_t>
inline const basic_value<string_t>& basic_array<string_t>::at(size_t pos) const
{
return _array_data.at(pos);
}
template <typename string_t>
inline string_t basic_array<string_t>::to_string() const
{
string_t str { '[' };
for (auto iter = _array_data.cbegin(); iter != _array_data.cend();) {
str += iter->to_string();
if (++iter != _array_data.cend()) {
str += ',';
}
}
str += char_t(']');
return str;
}
template <typename string_t>
inline string_t basic_array<string_t>::format(size_t indent, size_t indent_times) const
{
const string_t tail_indent(indent * indent_times, ' ');
const string_t body_indent(indent * (indent_times + 1), ' ');
string_t str { '[', '\n' };
for (auto iter = _array_data.cbegin(); iter != _array_data.cend();) {
str += body_indent + iter->format(indent, indent_times + 1);
if (++iter != _array_data.cend()) {
str += ',';
}
str += '\n';
}
str += tail_indent + char_t(']');
return str;
}
template <typename string_t>
template <typename value_t>
inline bool basic_array<string_t>::all() const
{
for (const auto& elem : _array_data) {
if (!elem.template is<value_t>()) {
return false;
}
}
return true;
}
template <typename string_t>
template <typename value_t, template <typename...> typename collection_t>
inline collection_t<value_t> basic_array<string_t>::as_collection() const
{
return as<collection_t<value_t>>();
}
template <typename string_t>
template <typename value_t, size_t Size, template <typename, size_t> typename fixed_array_t>
inline fixed_array_t<value_t, Size> basic_array<string_t>::as_fixed_array() const
{
return as<fixed_array_t<value_t, Size>>();
}
template <typename string_t>
template <typename... elem_ts>
inline std::tuple<elem_ts...> basic_array<string_t>::as_tuple() const
{
return as<std::tuple<elem_ts...>>();
}
template <typename string_t>
template <typename first_t, typename second_t>
inline std::pair<first_t, second_t> basic_array<string_t>::as_pair() const
{
return as<std::pair<first_t, second_t>>();
}
template <typename string_t>
template <typename... key_then_default_value_t>
inline auto basic_array<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
{
return get(
std::forward_as_tuple(keys_then_default_value...),
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
}
template <typename string_t>
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
inline auto basic_array<string_t>::get(
std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const
{
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
return get_helper(
std::get<default_value_index>(keys_then_default_value),
std::get<keys_indexes_t>(keys_then_default_value)...);
}
template <typename string_t>
template <typename value_t, typename... rest_keys_t>
inline auto basic_array<string_t>::get_helper(
const value_t& default_value,
size_t pos,
rest_keys_t&&... rest) const
{
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|| std::is_same_v<basic_array<string_t>, value_t>
|| std::is_same_v<basic_object<string_t>, value_t>;
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
if (!contains(pos)) {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
return at(pos).get_helper(default_value, std::forward<rest_keys_t>(rest)...);
}
template <typename string_t>
template <typename value_t>
inline auto basic_array<string_t>::get_helper(const value_t& default_value, size_t pos) const
{
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|| std::is_same_v<basic_array<string_t>, value_t>
|| std::is_same_v<basic_object<string_t>, value_t>;
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
if (!contains(pos)) {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
auto val = _array_data.at(pos);
if (val.template is<value_t>()) {
if constexpr (is_string) {
return val.template as<string_t>();
}
else {
return val.template as<value_t>();
}
}
else {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
}
template <typename string_t>
template <typename value_t>
inline std::optional<value_t> basic_array<string_t>::find(size_t pos) const
{
if (!contains(pos)) {
return std::nullopt;
}
const auto& val = _array_data.at(pos);
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>())
: std::nullopt;
}
template <typename string_t>
inline typename basic_array<string_t>::iterator basic_array<string_t>::begin() noexcept
{
return _array_data.begin();
}
template <typename string_t>
inline typename basic_array<string_t>::iterator basic_array<string_t>::end() noexcept
{
return _array_data.end();
}
template <typename string_t>
inline typename basic_array<string_t>::const_iterator basic_array<string_t>::begin() const noexcept
{
return _array_data.begin();
}
template <typename string_t>
inline typename basic_array<string_t>::const_iterator basic_array<string_t>::end() const noexcept
{
return _array_data.end();
}
template <typename string_t>
inline typename basic_array<string_t>::const_iterator basic_array<string_t>::cbegin() const noexcept
{
return _array_data.cbegin();
}
template <typename string_t>
inline typename basic_array<string_t>::const_iterator basic_array<string_t>::cend() const noexcept
{
return _array_data.cend();
}
template <typename string_t>
inline typename basic_array<string_t>::reverse_iterator basic_array<string_t>::rbegin() noexcept
{
return _array_data.rbegin();
}
template <typename string_t>
inline typename basic_array<string_t>::reverse_iterator basic_array<string_t>::rend() noexcept
{
return _array_data.rend();
}
template <typename string_t>
inline typename basic_array<string_t>::const_reverse_iterator
basic_array<string_t>::rbegin() const noexcept
{
return _array_data.rbegin();
}
template <typename string_t>
inline typename basic_array<string_t>::const_reverse_iterator
basic_array<string_t>::rend() const noexcept
{
return _array_data.rend();
}
template <typename string_t>
inline typename basic_array<string_t>::const_reverse_iterator
basic_array<string_t>::crbegin() const noexcept
{
return _array_data.crbegin();
}
template <typename string_t>
inline typename basic_array<string_t>::const_reverse_iterator
basic_array<string_t>::crend() const noexcept
{
return _array_data.crend();
}
template <typename string_t>
inline basic_value<string_t>& basic_array<string_t>::operator[](size_t pos)
{
return _array_data[pos];
}
template <typename string_t>
inline const basic_value<string_t>& basic_array<string_t>::operator[](size_t pos) const
{
return _array_data[pos];
}
template <typename string_t>
inline basic_array<string_t>
basic_array<string_t>::operator+(const basic_array<string_t>& rhs) const&
{
basic_array<string_t> temp = *this;
temp._array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
return temp;
}
template <typename string_t>
inline basic_array<string_t> basic_array<string_t>::operator+(basic_array<string_t>&& rhs) const&
{
basic_array<string_t> temp = *this;
temp._array_data.insert(
_array_data.end(),
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return temp;
}
template <typename string_t>
inline basic_array<string_t> basic_array<string_t>::operator+(const basic_array<string_t>& rhs) &&
{
_array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
return std::move(*this);
}
template <typename string_t>
inline basic_array<string_t> basic_array<string_t>::operator+(basic_array<string_t>&& rhs) &&
{
_array_data.insert(
_array_data.end(),
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return std::move(*this);
}
template <typename string_t>
inline basic_array<string_t>& basic_array<string_t>::operator+=(const basic_array<string_t>& rhs)
{
_array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
return *this;
}
template <typename string_t>
inline basic_array<string_t>& basic_array<string_t>::operator+=(basic_array<string_t>&& rhs)
{
_array_data.insert(
_array_data.end(),
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return *this;
}
template <typename string_t>
inline bool basic_array<string_t>::operator==(const basic_array<string_t>& rhs) const
{
return _array_data == rhs._array_data;
}
template <
typename ostream_t,
typename string_t,
typename std_ostream_t = std::basic_ostream<
typename string_t::value_type,
std::char_traits<typename string_t::value_type>>,
typename enable_t = std::enable_if_t<
std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
ostream_t& operator<<(ostream_t& out, const basic_array<string_t>& arr)
{
out << arr.format();
return out;
}
} // namespace json

View File

@@ -1,35 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include <exception>
#include <string>
namespace json
{
class exception : public std::exception
{
public:
exception() = default;
exception(const std::string& msg)
: _what(msg)
{
}
exception(const exception&) = default;
exception& operator=(const exception&) = default;
exception(exception&&) = default;
exception& operator=(exception&&) = default;
virtual ~exception() noexcept override = default;
virtual const char* what() const noexcept override
{
return _what.empty() ? "Unknown exception" : _what.c_str();
}
protected:
std::string _what;
};
}

View File

@@ -1,605 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include <initializer_list>
#include <map>
#include <optional>
#include <ostream>
#include <string>
#include <tuple>
#include "exception.hpp"
#include "utils.hpp"
namespace json
{
template <typename string_t>
class basic_object
{
friend class basic_value<string_t>;
friend class basic_array<string_t>;
public:
using raw_object = std::map<string_t, basic_value<string_t>>;
using key_type = typename raw_object::key_type;
using mapped_type = typename raw_object::mapped_type;
using value_type = typename raw_object::value_type;
using iterator = typename raw_object::iterator;
using const_iterator = typename raw_object::const_iterator;
using char_t = typename string_t::value_type;
public:
basic_object() = default;
basic_object(const basic_object<string_t>& rhs) = default;
basic_object(basic_object<string_t>&& rhs) noexcept = default;
basic_object(std::initializer_list<value_type> init_list);
// explicit basic_object(const basic_value<string_t>& val);
// explicit basic_object(basic_value<string_t>&& val);
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_to_json_in_templ_spec<jsonization_t, string_t>::value
&& !_utils::has_to_json_object_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
basic_object(const jsonization_t& value)
: basic_object(ext::jsonization<string_t, jsonization_t>().to_json(value))
{
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_to_json_object_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
basic_object(const jsonization_t& value)
: basic_object(ext::jsonization<string_t, jsonization_t>().to_json_object(value))
{
}
template <
typename jsonization_t,
std::enable_if_t<
std::is_rvalue_reference_v<jsonization_t&&>
&& _utils::has_move_to_json_in_templ_spec<jsonization_t, string_t>::value
&& !_utils::has_move_to_json_object_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
basic_object(jsonization_t&& value)
: basic_object(ext::jsonization<string_t, jsonization_t>().move_to_json(std::move(value)))
{
}
//template <
// typename jsonization_t,
// std::enable_if_t<
// std::is_rvalue_reference_v<jsonization_t&&>
// && _utils::has_move_to_json_object_in_templ_spec<jsonization_t, string_t>::value,
// bool> = true>
//basic_object(jsonization_t&& value)
// : basic_object(
// ext::jsonization<string_t, jsonization_t>().move_to_json_object(std::move(value)))
//{
//}
~basic_object() = default;
bool empty() const noexcept { return _object_data.empty(); }
size_t size() const noexcept { return _object_data.size(); }
bool contains(const string_t& key) const;
bool exists(const string_t& key) const { return contains(key); }
const basic_value<string_t>& at(const string_t& key) const;
string_t dumps(std::optional<size_t> indent = std::nullopt) const
{
return indent ? format(*indent) : to_string();
}
string_t to_string() const;
string_t format(size_t indent = 4) const { return format(indent, 0); }
template <typename value_t>
bool all() const;
template <typename value_t, template <typename...> typename map_t = std::map>
map_t<string_t, value_t> as_map() const;
template <
typename value_t,
std::enable_if_t<
_utils::has_from_json_object_in_templ_spec<value_t, string_t>::value,
bool> = true>
value_t as() const&
{
value_t res;
ext::jsonization<string_t, value_t>().from_json_object(*this, res);
return res;
}
template <
typename value_t,
std::enable_if_t<
_utils::has_move_from_json_object_in_templ_spec<value_t, string_t>::value,
bool> = true>
value_t as() &&
{
value_t res;
ext::jsonization<string_t, value_t>().move_from_json_object(std::move(*this), res);
return res;
}
// Usage: get(key_1, key_2, ..., default_value);
template <typename... key_then_default_value_t>
auto get(key_then_default_value_t&&... keys_then_default_value) const;
template <typename value_t = basic_value<string_t>>
std::optional<value_t> find(const string_t& key) const;
template <typename... args_t>
decltype(auto) emplace(args_t&&... args);
template <typename... args_t>
decltype(auto) insert(args_t&&... args);
void clear() noexcept;
bool erase(const string_t& key);
bool erase(iterator iter);
iterator begin() noexcept;
iterator end() noexcept;
const_iterator begin() const noexcept;
const_iterator end() const noexcept;
const_iterator cbegin() const noexcept;
const_iterator cend() const noexcept;
basic_value<string_t>& operator[](const string_t& key);
basic_value<string_t>& operator[](string_t&& key);
basic_object<string_t> operator|(const basic_object<string_t>& rhs) const&;
basic_object<string_t> operator|(basic_object<string_t>&& rhs) const&;
basic_object<string_t> operator|(const basic_object<string_t>& rhs) &&;
basic_object<string_t> operator|(basic_object<string_t>&& rhs) &&;
basic_object<string_t>& operator|=(const basic_object<string_t>& rhs);
basic_object<string_t>& operator|=(basic_object<string_t>&& rhs);
basic_object<string_t>& operator=(const basic_object<string_t>&) = default;
basic_object<string_t>& operator=(basic_object<string_t>&&) = default;
template <
typename value_t,
std::enable_if_t<std::is_convertible_v<value_t, basic_object<string_t>>, bool> = true>
basic_object<string_t>& operator=(value_t rhs)
{
return *this = basic_object<string_t>(std::move(rhs));
}
bool operator==(const basic_object<string_t>& rhs) const;
bool operator!=(const basic_object<string_t>& rhs) const { return !(*this == rhs); }
template <
typename value_t,
template <typename...> typename map_t = std::map,
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
explicit operator map_t<string_t, value_t>() const
{
return as_map<value_t, map_t>();
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value
&& !_utils::has_from_json_object_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
explicit operator jsonization_t() const&
{
jsonization_t dst {};
if (!ext::jsonization<string_t, jsonization_t>().from_json(*this, dst)) {
throw exception("Wrong JSON");
}
return dst;
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_from_json_object_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
explicit operator jsonization_t() const&
{
jsonization_t dst {};
if (!ext::jsonization<string_t, jsonization_t>().from_json_object(*this, dst)) {
throw exception("Wrong JSON");
}
return dst;
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_move_from_json_in_templ_spec<jsonization_t, string_t>::value
&& !_utils::has_move_from_json_object_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
explicit operator jsonization_t() &&
{
jsonization_t dst {};
if (!ext::jsonization<string_t, jsonization_t>().from_json(std::move(*this), dst)) {
throw exception("Wrong JSON");
}
return dst;
}
template <
typename jsonization_t,
std::enable_if_t<
_utils::has_move_from_json_object_in_templ_spec<jsonization_t, string_t>::value,
bool> = true>
explicit operator jsonization_t() &&
{
jsonization_t dst {};
if (!ext::jsonization<string_t, jsonization_t>().move_from_json_object(
std::move(*this),
dst)) {
throw exception("Wrong JSON");
}
return dst;
}
private:
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
auto
get(std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const;
template <typename value_t, typename... rest_keys_t>
auto get_helper(const value_t& default_value, const string_t& key, rest_keys_t&&... rest) const;
template <typename value_t>
auto get_helper(const value_t& default_value, const string_t& key) const;
string_t format(size_t indent, size_t indent_times) const;
private:
raw_object _object_data;
};
template <typename string_t>
inline basic_object<string_t>::basic_object(std::initializer_list<value_type> init_list)
: _object_data(
std::make_move_iterator(init_list.begin()),
std::make_move_iterator(init_list.end()))
{
}
// template <typename string_t>
// inline basic_object<string_t>::basic_object(const basic_value<string_t>& val) :
// basic_object<string_t>(val.as_object())
//{}
//
// template <typename string_t>
// inline basic_object<string_t>::basic_object(basic_value<string_t>&& val)
// : basic_object<string_t>(std::move(val.as_object()))
//{}
template <typename string_t>
inline bool basic_object<string_t>::contains(const string_t& key) const
{
return _object_data.find(key) != _object_data.cend();
}
template <typename string_t>
inline const basic_value<string_t>& basic_object<string_t>::at(const string_t& key) const
{
return _object_data.at(key);
}
template <typename string_t>
inline void basic_object<string_t>::clear() noexcept
{
_object_data.clear();
}
template <typename string_t>
inline bool basic_object<string_t>::erase(const string_t& key)
{
return _object_data.erase(key) > 0 ? true : false;
}
template <typename string_t>
inline bool basic_object<string_t>::erase(iterator iter)
{
return _object_data.erase(iter) != _object_data.end();
}
template <typename string_t>
template <typename... args_t>
inline decltype(auto) basic_object<string_t>::emplace(args_t&&... args)
{
static_assert(
std::is_constructible_v<value_type, args_t...>,
"Parameter can't be used to construct a raw_object::value_type");
return _object_data.insert_or_assign(std::forward<args_t>(args)...);
}
template <typename string_t>
template <typename... args_t>
inline decltype(auto) basic_object<string_t>::insert(args_t&&... args)
{
return emplace(std::forward<args_t>(args)...);
}
template <typename string_t>
inline string_t basic_object<string_t>::to_string() const
{
string_t str { '{' };
for (auto iter = _object_data.cbegin(); iter != _object_data.cend();) {
const auto& [key, val] = *iter;
str +=
char_t('"') + _utils::unescape_string(key) + string_t { '\"', ':' } + val.to_string();
if (++iter != _object_data.cend()) {
str += ',';
}
}
str += char_t('}');
return str;
}
template <typename string_t>
inline string_t basic_object<string_t>::format(size_t indent, size_t indent_times) const
{
const string_t tail_indent(indent * indent_times, ' ');
const string_t body_indent(indent * (indent_times + 1), ' ');
string_t str { '{', '\n' };
for (auto iter = _object_data.cbegin(); iter != _object_data.cend();) {
const auto& [key, val] = *iter;
str += body_indent + char_t('"') + _utils::unescape_string(key)
+ string_t { '\"', ':', ' ' } + val.format(indent, indent_times + 1);
if (++iter != _object_data.cend()) {
str += ',';
}
str += '\n';
}
str += tail_indent + char_t('}');
return str;
}
template <typename string_t>
template <typename value_t>
inline bool basic_object<string_t>::all() const
{
for (const auto& [_, val] : _object_data) {
if (!val.template is<value_t>()) {
return false;
}
}
return true;
}
template <typename string_t>
template <typename value_t, template <typename...> typename map_t>
inline map_t<string_t, value_t> basic_object<string_t>::as_map() const
{
return as<map_t<string_t, value_t>>();
}
template <typename string_t>
template <typename... key_then_default_value_t>
inline auto basic_object<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
{
return get(
std::forward_as_tuple(keys_then_default_value...),
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
}
template <typename string_t>
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
inline auto basic_object<string_t>::get(
std::tuple<key_then_default_value_t...> keys_then_default_value,
std::index_sequence<keys_indexes_t...>) const
{
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
return get_helper(
std::get<default_value_index>(keys_then_default_value),
std::get<keys_indexes_t>(keys_then_default_value)...);
}
template <typename string_t>
template <typename value_t, typename... rest_keys_t>
inline auto basic_object<string_t>::get_helper(
const value_t& default_value,
const string_t& key,
rest_keys_t&&... rest) const
{
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|| std::is_same_v<basic_array<string_t>, value_t>
|| std::is_same_v<basic_object<string_t>, value_t>;
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
if (!contains(key)) {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
return at(key).get_helper(default_value, std::forward<rest_keys_t>(rest)...);
}
template <typename string_t>
template <typename value_t>
inline auto
basic_object<string_t>::get_helper(const value_t& default_value, const string_t& key) const
{
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|| std::is_same_v<basic_array<string_t>, value_t>
|| std::is_same_v<basic_object<string_t>, value_t>;
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
if (!contains(key)) {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
auto val = _object_data.at(key);
if (val.template is<value_t>()) {
if constexpr (is_string) {
return val.template as<string_t>();
}
else {
return val.template as<value_t>();
}
}
else {
if constexpr (is_string) {
return string_t(default_value);
}
else {
return value_t(default_value);
}
}
}
template <typename string_t>
template <typename value_t>
inline std::optional<value_t> basic_object<string_t>::find(const string_t& key) const
{
auto iter = _object_data.find(key);
if (iter == _object_data.end()) {
return std::nullopt;
}
const auto& val = iter->second;
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>())
: std::nullopt;
}
template <typename string_t>
inline typename basic_object<string_t>::iterator basic_object<string_t>::begin() noexcept
{
return _object_data.begin();
}
template <typename string_t>
inline typename basic_object<string_t>::iterator basic_object<string_t>::end() noexcept
{
return _object_data.end();
}
template <typename string_t>
inline typename basic_object<string_t>::const_iterator
basic_object<string_t>::begin() const noexcept
{
return _object_data.begin();
}
template <typename string_t>
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::end() const noexcept
{
return _object_data.end();
}
template <typename string_t>
inline typename basic_object<string_t>::const_iterator
basic_object<string_t>::cbegin() const noexcept
{
return _object_data.cbegin();
}
template <typename string_t>
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::cend() const noexcept
{
return _object_data.cend();
}
template <typename string_t>
inline basic_value<string_t>& basic_object<string_t>::operator[](const string_t& key)
{
return _object_data[key];
}
template <typename string_t>
inline basic_value<string_t>& basic_object<string_t>::operator[](string_t&& key)
{
return _object_data[std::move(key)];
}
template <typename string_t>
inline basic_object<string_t>
basic_object<string_t>::operator|(const basic_object<string_t>& rhs) const&
{
basic_object<string_t> temp = *this;
temp._object_data.insert(rhs.begin(), rhs.end());
return temp;
}
template <typename string_t>
inline basic_object<string_t> basic_object<string_t>::operator|(basic_object<string_t>&& rhs) const&
{
basic_object<string_t> temp = *this;
// temp._object_data.merge(std::move(rhs._object_data));
temp._object_data.insert(
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return temp;
}
template <typename string_t>
inline basic_object<string_t>
basic_object<string_t>::operator|(const basic_object<string_t>& rhs) &&
{
_object_data.insert(rhs.begin(), rhs.end());
return std::move(*this);
}
template <typename string_t>
inline basic_object<string_t> basic_object<string_t>::operator|(basic_object<string_t>&& rhs) &&
{
//_object_data.merge(std::move(rhs._object_data));
_object_data.insert(std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
return std::move(*this);
}
template <typename string_t>
inline basic_object<string_t>& basic_object<string_t>::operator|=(const basic_object<string_t>& rhs)
{
_object_data.insert(rhs.begin(), rhs.end());
return *this;
}
template <typename string_t>
inline basic_object<string_t>& basic_object<string_t>::operator|=(basic_object<string_t>&& rhs)
{
_object_data.insert(std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
return *this;
}
template <typename string_t>
inline bool basic_object<string_t>::operator==(const basic_object<string_t>& rhs) const
{
return _object_data == rhs._object_data;
}
template <
typename ostream_t,
typename string_t,
typename std_ostream_t = std::basic_ostream<
typename string_t::value_type,
std::char_traits<typename string_t::value_type>>,
typename enable_t = std::enable_if_t<
std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
ostream_t& operator<<(ostream_t& out, const basic_object<string_t>& obj)
{
out << obj.format();
return out;
}
} // namespace json

View File

@@ -1,207 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include <type_traits>
#include "types.hpp"
#include "utils.hpp"
namespace json
{
namespace _serialization_helper
{
template <typename in_t, typename serializer_t>
class is_serializable
{
template <typename U>
static auto test(int)
-> decltype(std::declval<serializer_t>()(std::declval<U>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<in_t>(0))::value;
};
struct empty_serializer
{
// sample:
// json::value operator()(const type_1&) const { return ...; }
// json::value operator()(const type_2&) const { return ...; }
// json::value operator()(const type_3&) const { return ...; }
};
template <typename T>
void unable_to_serialize()
{
static_assert(
!sizeof(T),
"Unable to serialize T. "
#ifdef _MSC_VER
"See T below: " __FUNCSIG__
#else
// "See T below: " __PRETTY_FUNCTION__
#endif
);
}
}
namespace _serialization_helper
{
template <typename out_t, typename deserializer_t, typename string_t = default_string_t>
class is_deserializable
{
template <typename U>
static auto test(int)
-> decltype(std::declval<deserializer_t>()(std::declval<basic_value<string_t>>(), std::declval<U&>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<out_t>(0))::value;
};
struct empty_deserializer
{
// sample:
// bool operator()(const json::value&, type_1&) const { return ...; }
// bool operator()(const json::value&, type_2&) const { return ...; }
// bool operator()(const json::value&, type_3&) const { return ...; }
};
template <typename T>
void unable_to_deserialize()
{
static_assert(
!sizeof(T),
"Unable to deserialize T. "
#ifdef _MSC_VER
"See T below: " __FUNCSIG__
#else
// "See T below: " __PRETTY_FUNCTION__
#endif
);
}
}
template <
typename in_t,
typename serializer_t = _serialization_helper::empty_serializer,
typename string_t = default_string_t>
basic_value<string_t> serialize(in_t&& in, const serializer_t& serializer = {})
{
if constexpr (_serialization_helper::is_serializable<in_t, serializer_t>::value) {
return serializer(std::forward<in_t>(in));
}
else if constexpr (
_utils::is_collection<std::decay_t<in_t>> || _utils::is_fixed_array<std::decay_t<in_t>>) {
basic_array<string_t> arr;
for (auto&& elem : in) {
using elem_t = decltype(elem);
auto j_elem =
serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
arr.emplace_back(std::move(j_elem));
}
return arr;
}
else if constexpr (_utils::is_map<std::decay_t<in_t>>) {
basic_object<string_t> obj;
for (auto&& [key, elem] : in) {
using key_t = decltype(key);
using elem_t = decltype(elem);
auto j_elem =
serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
obj.emplace(std::forward<key_t>(key), std::move(j_elem));
}
return obj;
}
else if constexpr (std::is_constructible_v<basic_value<string_t>, in_t>) {
return basic_value<string_t>(std::forward<in_t>(in));
}
else {
_serialization_helper::unable_to_serialize<in_t>();
}
}
template <
typename out_t,
typename deserializer_t = _serialization_helper::empty_deserializer,
typename string_t = default_string_t>
bool deserialize(
const basic_value<string_t>& in,
out_t& out,
const deserializer_t& deserializer = {})
{
if constexpr (_serialization_helper::is_deserializable<out_t, deserializer_t>::value) {
return deserializer(in, out);
}
else if constexpr (_utils::is_collection<std::decay_t<out_t>>) {
if (!in.is_array()) {
return false;
}
for (auto&& j_elem : in.as_array()) {
using elem_t = typename out_t::value_type;
elem_t elem {};
if (!deserialize<elem_t, deserializer_t, string_t>(j_elem, elem, deserializer)) {
return false;
}
if constexpr (_as_collection_helper::has_emplace_back<out_t>::value) {
out.emplace_back(std::move(elem));
}
else {
out.emplace(std::move(elem));
}
}
return true;
}
else if constexpr (_utils::is_fixed_array<std::decay_t<out_t>>) {
if (!in.is_array()) {
return false;
}
auto&& in_as_arr = in.as_array();
constexpr size_t out_size = _utils::fixed_array_size<out_t>;
if (in_as_arr.size() != out_size) {
return false;
}
for (size_t i = 0; i < out_size; ++i) {
auto&& j_elem = in_as_arr.at(i);
using elem_t = typename out_t::value_type;
elem_t elem {};
if (!deserialize<elem_t, deserializer_t, string_t>(j_elem, elem, deserializer)) {
return false;
}
out.at(i) = std::move(elem);
}
return true;
}
else if constexpr (_utils::is_map<std::decay_t<out_t>>) {
if (!in.is_object()) {
return false;
}
for (auto&& [key, j_elem] : in.as_object()) {
using elem_t = typename out_t::mapped_type;
elem_t elem {};
if (!deserialize<elem_t, deserializer_t, string_t>(j_elem, elem, deserializer)) {
return false;
}
out.emplace(std::forward<decltype(key)>(key), std::move(elem));
}
return true;
}
else if constexpr (std::is_constructible_v<out_t, basic_value<string_t>>) {
out = out_t(in);
return true;
}
else {
_serialization_helper::unable_to_deserialize<out_t>();
}
}
} // namespace json

View File

@@ -1,7 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include "array.hpp"
#include "object.hpp"
#include "value.hpp"

View File

@@ -1,473 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include <iomanip>
#include <limits>
#include <sstream>
#include <string>
#include <type_traits>
#include <utility>
#include <variant>
namespace json
{
template <typename string_t>
class basic_value;
template <typename string_t>
class basic_array;
template <typename string_t>
class basic_object;
using default_string_t = std::string;
using value = basic_value<default_string_t>;
using array = basic_array<default_string_t>;
using object = basic_object<default_string_t>;
using wvalue = basic_value<std::wstring>;
using warray = basic_array<std::wstring>;
using wobject = basic_object<std::wstring>;
}
namespace json::ext
{
template <typename string_t, typename T, typename = void>
class jsonization
{
public:
// json::value to_json(const T&) const;
// bool check_json(const json::value&) const;
// bool from_json(const json::value&, T&) const;
};
}
namespace json::_utils
{
template <typename T>
using iterator_t = decltype(std::declval<T&>().begin());
template <typename T>
using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>;
template <typename T>
using iter_value_t = typename std::iterator_traits<remove_cvref_t<T>>::value_type;
template <typename R>
using range_value_t = iter_value_t<iterator_t<R>>;
template <typename T, typename = void>
constexpr bool is_string = false;
template <typename T>
constexpr bool is_string<T, std::void_t<typename T::traits_type>> =
std::is_same_v<typename T::traits_type, std::char_traits<typename T::value_type>>;
template <typename T, typename = void>
constexpr bool is_container = false;
template <typename T>
constexpr bool is_container<T, std::void_t<typename T::value_type, range_value_t<T>>> =
std::is_same_v<typename T::value_type, range_value_t<T>> && !is_string<T>;
template <typename T, typename = void>
constexpr bool is_map = false;
template <typename T>
constexpr bool is_map<T, std::void_t<typename T::key_type, typename T::mapped_type>> =
is_container<T>;
template <typename T, typename = void>
constexpr bool is_fixed_array = false;
template <template <typename, size_t> typename arr_t, typename value_t, size_t size>
constexpr bool is_fixed_array<arr_t<value_t, size>> = true;
template <typename T, typename = std::enable_if_t<is_fixed_array<T>>>
constexpr size_t fixed_array_size = 0;
template <template <typename, size_t> typename arr_t, typename value_t, size_t size>
constexpr size_t fixed_array_size<arr_t<value_t, size>> = size;
template <typename T, typename = void>
constexpr bool is_collection = false;
template <typename T>
constexpr bool is_collection<T> = is_container<T> && !is_map<T> && !is_fixed_array<T>;
template <typename T>
constexpr bool is_variant = false;
template <typename... args_t>
constexpr bool is_variant<std::variant<args_t...>> = true;
template <typename T>
constexpr bool is_tuple = false;
template <typename... args_t>
constexpr bool is_tuple<std::tuple<args_t...>> = true;
template <typename T>
constexpr bool is_pair = false;
template <typename... args_t>
constexpr bool is_pair<std::pair<args_t...>> = true;
template <typename T, typename = void>
constexpr bool is_tuple_like = false;
template <template <typename...> typename tuple_t, typename... args_t>
constexpr bool is_tuple_like<
tuple_t<args_t...>,
std::void_t<decltype(std::tuple_size<tuple_t<args_t...>>::value)>> =
std::tuple_size<tuple_t<args_t...>>::value == sizeof...(args_t);
template <typename T>
class has_emplace_back
{
template <typename U>
static auto test(int) -> decltype(std::declval<U>().emplace_back(), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T>
class has_to_json_in_member
{
template <typename U>
static auto test(int) -> decltype(std::declval<U>().to_json(), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_check_json_in_member
{
template <typename U>
static auto test(int)
-> decltype(std::declval<U>().check_json(std::declval<json::basic_value<string_t>>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_from_json_in_member
{
template <typename U>
static auto test(int)
-> decltype(std::declval<U>().from_json(std::declval<json::basic_value<string_t>>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_to_json_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().to_json(std::declval<U>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_check_json_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().check_json(std::declval<json::basic_value<string_t>>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_from_json_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().from_json(std::declval<json::basic_value<string_t>>(), std::declval<U&>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_move_to_json_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().move_to_json(std::declval<U>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_move_from_json_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().move_from_json(std::declval<json::basic_value<string_t>>(), std::declval<U&>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_to_json_array_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().to_json_array(std::declval<U>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_check_json_array_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().check_json_array(std::declval<json::basic_array<string_t>>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_from_json_array_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().from_json_array(std::declval<json::basic_array<string_t>>(), std::declval<U&>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_move_to_json_array_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().move_to_json_array(std::declval<U>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_move_from_json_array_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().move_from_json_array(std::declval<json::basic_array<string_t>>(), std::declval<U&>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_to_json_object_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().to_json_object(std::declval<U>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_check_json_object_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().check_json_object(std::declval<json::basic_object<string_t>>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_from_json_object_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().from_json_object(std::declval<json::basic_object<string_t>>(), std::declval<U&>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_move_to_json_object_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().move_to_json_object(std::declval<U>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename T, typename string_t>
class has_move_from_json_object_in_templ_spec
{
template <typename U>
static auto test(int)
-> decltype(std::declval<ext::jsonization<string_t, U>>().move_from_json_object(std::declval<json::basic_object<string_t>>(), std::declval<U&>()), std::true_type());
template <typename U>
static std::false_type test(...);
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
template <typename string_t>
inline constexpr string_t unescape_string(const string_t& str)
{
using char_t = typename string_t::value_type;
string_t result {};
auto cur = str.cbegin();
auto end = str.cend();
auto no_escape_beg = cur;
char_t escape = 0;
for (; cur != end; ++cur) {
switch (*cur) {
case '"':
escape = '"';
break;
case '\\':
escape = '\\';
break;
case '\b':
escape = 'b';
break;
case '\f':
escape = 'f';
break;
case '\n':
escape = 'n';
break;
case '\r':
escape = 'r';
break;
case '\t':
escape = 't';
break;
default:
break;
}
if (escape) {
result += string_t(no_escape_beg, cur) + char_t('\\') + escape;
no_escape_beg = cur + 1;
escape = 0;
}
}
result += string_t(no_escape_beg, cur);
return result;
}
template <typename string_t>
inline constexpr string_t true_string()
{
return { 't', 'r', 'u', 'e' };
}
template <typename string_t>
inline constexpr string_t false_string()
{
return { 'f', 'a', 'l', 's', 'e' };
}
template <typename string_t>
inline constexpr string_t null_string()
{
return { 'n', 'u', 'l', 'l' };
}
template <typename string_t, typename any_t>
inline string_t to_basic_string(any_t&& arg)
{
#ifdef MEOJSON_KEEP_FLOATING_PRECISION
using real_type = std::remove_reference_t<any_t>;
if constexpr (std::is_floating_point_v<real_type>) {
if constexpr (std::is_same_v<string_t, std::string>) {
std::ostringstream oss;
oss << std::setprecision(std::numeric_limits<real_type>::max_digits10) << arg;
return oss.str();
}
else if constexpr (std::is_same_v<string_t, std::wstring>) {
std::wostringstream oss;
oss << std::setprecision(std::numeric_limits<real_type>::max_digits10) << arg;
return oss.str();
}
}
#endif
if constexpr (std::is_same_v<string_t, std::string>) {
return std::to_string(std::forward<any_t>(arg));
}
else if constexpr (std::is_same_v<string_t, std::wstring>) {
return std::to_wstring(std::forward<any_t>(arg));
}
else {
static_assert(!sizeof(any_t), "Unsupported type");
}
}
} // namespace json::_utils
#include "../reflection/extensions.hpp"

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +0,0 @@
#pragma once
// IWYU pragma: begin_exports
#include "common/types.hpp"
#include "parser/parser.hpp"
#include "reflection/jsonization.hpp"
// IWYU pragma: end_exports

View File

@@ -1,139 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#if __cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
#include <bit>
namespace json::_bitops
{
using std::countl_one;
using std::countl_zero;
using std::countr_one;
using std::countr_zero;
inline constexpr bool is_little_endian()
{
return std::endian::native == std::endian::little;
}
}
#else
#include <cstdint>
namespace json::_bitops
{
#if defined(__GNUC__) || defined(__clang__)
inline constexpr int countl_zero(uint32_t x)
{
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) {
return x == 0 ? 32 : __builtin_clz(x);
}
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) {
return x == 0 ? 32 : __builtin_clzl(x);
}
return x == 0 ? 32 : __builtin_clzll(x);
}
inline constexpr int countr_zero(uint32_t x)
{
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) {
return x == 0 ? 32 : __builtin_ctz(x);
}
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) {
return x == 0 ? 32 : __builtin_ctzl(x);
}
return x == 0 ? 32 : __builtin_ctzll(x);
}
inline constexpr int countl_zero(uint64_t x)
{
return x == 0 ? 64 : __builtin_clzll(x);
}
inline constexpr int countr_zero(uint64_t x)
{
return x == 0 ? 64 : __builtin_ctzll(x);
}
#elif defined(_MSC_VER)
#ifdef __AVX2__
// lzcnt intrinsics is not constexpr
inline int countl_zero(uint32_t x)
{
return __lzcnt(x);
}
inline int countr_zero(uint32_t x)
{
return _tzcnt_u32(x);
}
inline int countl_zero(uint64_t x)
{
return (int)__lzcnt64(x);
}
inline int countr_zero(uint64_t x)
{
return (int)_tzcnt_u64(x);
}
#else
inline constexpr int countl_zero(uint32_t x)
{
unsigned long index = 0;
return _BitScanReverse(&index, x) ? 31 - index : 32;
}
inline constexpr int countr_zero(uint32_t x)
{
unsigned long index = 0;
return _BitScanForward(&index, x) ? index : 32;
}
inline constexpr int countl_zero(uint64_t x)
{
unsigned long index = 0;
return _BitScanReverse64(&index, x) ? 63 - index : 64;
}
inline constexpr int countr_zero(uint64_t x)
{
unsigned long index = 0;
return _BitScanForward64(&index, x) ? index : 64;
}
#endif // __AVX2__
#else // compiler
#error "bring your own bit counting implementation"
#endif
inline int countl_one(uint32_t x)
{
return countl_zero(~x);
}
inline int countr_one(uint32_t x)
{
return countr_zero(~x);
}
inline int countl_one(uint64_t x)
{
return countl_zero(~x);
}
inline int countr_one(uint64_t x)
{
return countr_zero(~x);
}
// no constexpr endian awareness before C++20
inline bool is_little_endian()
{
union
{
uint32_t u32;
uint8_t u8;
} u = { 0x01020304 };
return u.u8 == 4;
}
} // namespace json::_bitops
#endif // C++20

View File

@@ -1,161 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include <cstdint>
#include <cstring>
#include <type_traits>
#include "bitops.hpp"
#if defined(__GNUC__) || defined(__clang__)
#define __packed_bytes_strong_inline __attribute__((always_inline))
#elif defined(_MSC_VER)
#define __packed_bytes_strong_inline __forceinline
#else
#define __packed_bytes_strong_inline inline
#endif
namespace json::_packed_bytes
{
struct packed_bytes_trait_none
{
static constexpr bool available = false;
};
template <size_t N>
struct packed_bytes
{
using traits = packed_bytes_trait_none;
};
}
#ifndef MEOJSON_DISABLE_PACKED_BYTES
#if defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP)
#include "packed_bytes_x86.hpp"
#elif defined(__ARM_NEON) || defined(_M_ARM) || defined(_M_ARM64)
#include "packed_bytes_arm.hpp"
#endif
#endif
namespace json::_packed_bytes
{
struct packed_bytes_trait_uint64
{
static constexpr bool available = sizeof(void*) >= 8;
static constexpr auto step = 8;
using value_type = uint64_t;
__packed_bytes_strong_inline static value_type load_unaligned(const void* ptr)
{
value_type result;
memcpy((void*)&result, ptr, 8);
return result;
}
__packed_bytes_strong_inline static value_type less(value_type x, uint8_t n)
{
return (((x)-UINT64_C(0x0101010101010101) * (n)) & ~(x)&UINT64_C(0x8080808080808080));
}
__packed_bytes_strong_inline static value_type is_zero_memberwise(value_type v)
{
return (((v)-UINT64_C(0x0101010101010101)) & ~(v)&UINT64_C(0x8080808080808080));
}
__packed_bytes_strong_inline static bool is_all_zero(value_type v) { return v == UINT64_C(0); }
__packed_bytes_strong_inline static value_type equal(value_type x, uint8_t n)
{
return is_zero_memberwise((x) ^ (UINT64_C(0x0101010101010101) * (n)));
}
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
{
return a | b;
}
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
{
if (_bitops::is_little_endian()) {
return _bitops::countr_zero(x) / 8;
}
else {
return _bitops::countl_zero(x) / 8;
}
}
};
struct packed_bytes_trait_uint32
{
static constexpr bool available = true;
static constexpr auto step = 4;
using value_type = uint32_t;
__packed_bytes_strong_inline static value_type load_unaligned(const void* ptr)
{
value_type result;
memcpy((void*)&result, ptr, 4);
return result;
}
__packed_bytes_strong_inline static value_type less(value_type x, uint8_t n)
{
return (((x) - ~UINT32_C(0) / 255 * (n)) & ~(x) & ~UINT32_C(0) / 255 * 128);
}
__packed_bytes_strong_inline static value_type is_zero_memberwise(value_type v)
{
return (((v)-UINT32_C(0x01010101)) & ~(v)&UINT32_C(0x80808080));
;
}
__packed_bytes_strong_inline static bool is_all_zero(value_type v) { return v == UINT32_C(0); }
__packed_bytes_strong_inline static value_type equal(value_type x, uint8_t n)
{
return is_zero_memberwise((x) ^ (~UINT32_C(0) / 255 * (n)));
}
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
{
return a | b;
}
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
{
if (_bitops::is_little_endian()) {
return _bitops::countr_zero(x) / 8;
}
else {
return _bitops::countl_zero(x) / 8;
}
}
};
template <>
struct packed_bytes<8>
{
using traits = packed_bytes_trait_uint64;
};
template <>
struct packed_bytes<4>
{
using traits = packed_bytes_trait_uint32;
};
template <size_t N>
using packed_bytes_trait = typename packed_bytes<N>::traits;
using packed_bytes_trait_max = std::conditional_t<
packed_bytes_trait<32>::available,
packed_bytes_trait<32>,
std::conditional_t<
packed_bytes_trait<16>::available,
packed_bytes_trait<16>,
std::conditional_t<
packed_bytes_trait<8>::available,
packed_bytes_trait<8>,
packed_bytes_trait<4>>>>;
} // namespace json::_packed_bytes

View File

@@ -1,79 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
// current NEON implementation doesn't outperform 64-bit scalar implementation
#ifdef MEOJSON_ENABLE_NEON
#include "packed_bytes.hpp"
#include <arm_neon.h>
#if defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64)
#define __packed_bytes_trait_arm64
#endif
namespace json::_packed_bytes
{
struct packed_bytes_trait_neon
{
static constexpr bool available = true;
static constexpr auto step = 16;
using value_type = uint8x16_t;
__packed_bytes_strong_inline static value_type load_unaligned(const void* ptr)
{
return vld1q_u8((uint8_t*)ptr);
}
__packed_bytes_strong_inline static value_type less(value_type x, uint8_t n)
{
auto bcast = vdupq_n_u8(n);
auto is_less = vcltq_u8(x, bcast);
return is_less;
}
__packed_bytes_strong_inline static value_type equal(value_type x, uint8_t n)
{
return vceqq_u8(x, vdupq_n_u8(n));
}
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y)
{
return vceqq_u8(x, y);
}
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
{
return vorrq_u8(a, b);
}
__packed_bytes_strong_inline static bool is_all_zero(value_type x)
{
#ifdef __packed_bytes_trait_arm64
return vmaxvq_u8(x) == 0;
#else
auto fold64 = vorr_u64(
vget_high_u64(vreinterpretq_u8_u64(x), 0),
vget_low_u64(vreinterpretq_u8_u64(x), 1));
auto fold32 = vget_lane_u32(vreinterpret_u64_u32(fold64), 0)
| vget_lane_u32(vreinterpret_u64_u32(fold64), 1);
return fold32 == 0;
#endif
}
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
{
// https://community.arm.com/arm-community-blogs/b/infrastructure-solutions-blog/posts/porting-x86-vector-bitmask-optimizations-to-arm-neon
auto cmp = equal(x, 0);
auto res = vshrn_n_u16(cmp, 4);
auto mask64 = vget_lane_u64(vreinterpret_u64_u8(res), 0);
return _bitops::countr_one(mask64) >> 2;
}
};
template <>
struct packed_bytes<16>
{
using traits = packed_bytes_trait_neon;
};
}
#endif

View File

@@ -1,140 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include "packed_bytes.hpp"
#include <emmintrin.h>
#if defined(__SSE4_1__) || defined(__AVX2__) || defined(_MSC_VER)
// MSVC enables all SSE4.1 intrinsics by default
#include <smmintrin.h>
#endif
namespace json::_packed_bytes
{
struct packed_bytes_trait_sse
{
static constexpr bool available = true;
static constexpr auto step = 16;
using value_type = __m128i;
__packed_bytes_strong_inline static value_type load_unaligned(const void* ptr)
{
return _mm_loadu_si128(reinterpret_cast<const __m128i*>(ptr));
}
__packed_bytes_strong_inline static value_type less(value_type x, uint8_t n)
{
auto bcast = _mm_set1_epi8(static_cast<char>(n));
auto all1 = _mm_set1_epi8(-1);
auto max_with_n = _mm_max_epu8(x, bcast);
auto is_greater_or_equal = _mm_cmpeq_epi8(max_with_n, x);
auto is_less = _mm_andnot_si128(is_greater_or_equal, all1);
return is_less;
}
__packed_bytes_strong_inline static value_type equal(value_type x, uint8_t n)
{
return _mm_cmpeq_epi8(x, _mm_set1_epi8(static_cast<char>(n)));
}
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y)
{
return _mm_cmpeq_epi8(x, y);
}
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
{
return _mm_or_si128(a, b);
}
__packed_bytes_strong_inline static bool is_all_zero(value_type x)
{
#if defined(__SSE4_1__) || defined(__AVX2__) || defined(_MSC_VER)
// SSE4.1 path
return !!_mm_testz_si128(x, x);
#else
// SSE2 path
auto cmp = _mm_cmpeq_epi8(x, _mm_set1_epi8(0));
auto mask = (uint16_t)_mm_movemask_epi8(cmp);
return mask == UINT16_C(0xFFFF);
#endif
}
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
{
auto cmp = _mm_cmpeq_epi8(x, _mm_set1_epi8(0));
auto mask = (uint16_t)_mm_movemask_epi8(cmp);
return _bitops::countr_one((uint32_t)mask);
}
};
template <>
struct packed_bytes<16>
{
using traits = packed_bytes_trait_sse;
};
}
#ifdef __AVX2__
#include <immintrin.h>
namespace json::_packed_bytes
{
struct packed_bytes_trait_avx2
{
static constexpr bool available = true;
static constexpr auto step = 32;
using value_type = __m256i;
__packed_bytes_strong_inline static value_type load_unaligned(const void* ptr)
{
return _mm256_loadu_si256(reinterpret_cast<const __m256i*>(ptr));
}
__packed_bytes_strong_inline static value_type less(value_type x, uint8_t n)
{
auto bcast = _mm256_set1_epi8(static_cast<char>(n));
auto all1 = _mm256_set1_epi8(-1);
auto max_with_n = _mm256_max_epu8(x, bcast);
auto is_greater_or_equal = _mm256_cmpeq_epi8(max_with_n, x);
auto is_less = _mm256_andnot_si256(is_greater_or_equal, all1);
return is_less;
}
__packed_bytes_strong_inline static value_type equal(value_type x, uint8_t n)
{
return _mm256_cmpeq_epi8(x, _mm256_set1_epi8(static_cast<char>(n)));
}
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y)
{
return _mm256_cmpeq_epi8(x, y);
}
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
{
return _mm256_or_si256(a, b);
}
__packed_bytes_strong_inline static bool is_all_zero(value_type x)
{
return (bool)_mm256_testz_si256(x, x);
}
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
{
auto cmp = _mm256_cmpeq_epi8(x, _mm256_set1_epi8(0));
auto mask = (uint32_t)_mm256_movemask_epi8(cmp);
// AVX512 alternative: _mm_cmpeq_epi8_mask
return _bitops::countr_one(mask);
}
};
template <>
struct packed_bytes<32>
{
using traits = packed_bytes_trait_avx2;
};
}
#endif

View File

@@ -1,862 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include <cctype>
#include <fstream>
#include <optional>
#include <ostream>
#include <string>
#include <tuple>
#include "../common/types.hpp"
#include "packed_bytes.hpp"
namespace json
{
// ****************************
// * parser declare *
// ****************************
template <
bool accept_jsonc = false,
typename string_t = default_string_t,
typename parsing_t = void,
typename accel_traits = _packed_bytes::packed_bytes_trait_max>
class parser
{
public:
using parsing_iter_t = typename parsing_t::const_iterator;
public:
~parser() noexcept = default;
static std::optional<basic_value<string_t>> parse(const parsing_t& content);
private:
parser(parsing_iter_t cbegin, parsing_iter_t cend) noexcept
: _cur(cbegin)
, _end(cend)
{
;
}
std::optional<basic_value<string_t>> parse();
basic_value<string_t> parse_value();
basic_value<string_t> parse_null();
basic_value<string_t> parse_boolean();
basic_value<string_t> parse_number();
// parse and return a basic_value<string_t> whose type is value_type::string
basic_value<string_t> parse_string();
basic_value<string_t> parse_array();
basic_value<string_t> parse_object();
// parse and return a string_t
std::optional<string_t> parse_stdstring();
bool skip_string_literal_with_accel();
bool skip_whitespace() noexcept;
bool skip_comment() noexcept;
bool skip_digit();
bool skip_unicode_escape(uint16_t& pair_high, string_t& result);
private:
parsing_iter_t _cur;
parsing_iter_t _end;
};
// ***************************
// * utils declare *
// ***************************
template <typename parsing_t>
auto parse(const parsing_t& content);
template <typename char_t>
auto parse(char_t* content);
template <typename parsing_t>
auto parsec(const parsing_t& content);
template <typename char_t>
auto parsec(char_t* content);
template <
typename istream_t,
typename = std::enable_if_t<
std::is_base_of_v<std::basic_istream<typename istream_t::char_type>, istream_t>>>
auto parse(istream_t& istream, bool check_bom = false, bool with_commets = false);
template <typename ifstream_t = std::ifstream, typename path_t = void>
auto open(const path_t& path, bool check_bom = false, bool with_commets = false);
namespace literals
{
value operator""_json(const char* str, size_t len);
wvalue operator""_json(const wchar_t* str, size_t len);
value operator""_jvalue(const char* str, size_t len);
wvalue operator""_jvalue(const wchar_t* str, size_t len);
array operator""_jarray(const char* str, size_t len);
warray operator""_jarray(const wchar_t* str, size_t len);
object operator""_jobject(const char* str, size_t len);
wobject operator""_jobject(const wchar_t* str, size_t len);
}
template <typename string_t = default_string_t>
const basic_value<string_t> invalid_value();
// *************************
// * parser impl *
// *************************
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline std::optional<basic_value<string_t>>
parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse(const parsing_t& content)
{
return parser<accept_jsonc, string_t, parsing_t, accel_traits>(content.cbegin(), content.cend())
.parse();
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline std::optional<basic_value<string_t>>
parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse()
{
if (!skip_whitespace()) {
return std::nullopt;
}
basic_value<string_t> result_value;
switch (*_cur) {
case '[':
result_value = parse_array();
break;
case '{':
result_value = parse_object();
break;
default: // A JSON payload should be an basic_object or basic_array
return std::nullopt;
}
if (!result_value.valid()) {
return std::nullopt;
}
// After the parsing is complete, there should be no more content other than spaces behind
if (skip_whitespace()) {
return std::nullopt;
}
return result_value;
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse_value()
{
switch (*_cur) {
case 'n':
return parse_null();
case 't':
case 'f':
return parse_boolean();
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return parse_number();
case '"':
return parse_string();
case '[':
return parse_array();
case '{':
return parse_object();
default:
return invalid_value<string_t>();
}
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse_null()
{
for (const auto& ch : _utils::null_string<string_t>()) {
if (_cur != _end && *_cur == ch) {
++_cur;
}
else {
return invalid_value<string_t>();
}
}
return basic_value<string_t>();
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t>
parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse_boolean()
{
switch (*_cur) {
case 't':
for (const auto& ch : _utils::true_string<string_t>()) {
if (_cur != _end && *_cur == ch) {
++_cur;
}
else {
return invalid_value<string_t>();
}
}
return true;
case 'f':
for (const auto& ch : _utils::false_string<string_t>()) {
if (_cur != _end && *_cur == ch) {
++_cur;
}
else {
return invalid_value<string_t>();
}
}
return false;
default:
return invalid_value<string_t>();
}
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse_number()
{
const auto first = _cur;
if (*_cur == '-') {
++_cur;
}
// numbers cannot have leading zeroes
if (_cur != _end && *_cur == '0' && _cur + 1 != _end && std::isdigit(*(_cur + 1))) {
return invalid_value<string_t>();
}
if (!skip_digit()) {
return invalid_value<string_t>();
}
if (*_cur == '.') {
++_cur;
if (!skip_digit()) {
return invalid_value<string_t>();
}
}
if (*_cur == 'e' || *_cur == 'E') {
if (++_cur == _end) {
return invalid_value<string_t>();
}
if (*_cur == '+' || *_cur == '-') {
++_cur;
}
if (!skip_digit()) {
return invalid_value<string_t>();
}
}
return basic_value<string_t>(basic_value<string_t>::value_type::number, string_t(first, _cur));
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse_string()
{
auto string_opt = parse_stdstring();
if (!string_opt) {
return invalid_value<string_t>();
}
return basic_value<string_t>(
basic_value<string_t>::value_type::string,
std::move(string_opt).value());
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse_array()
{
if (*_cur == '[') {
++_cur;
}
else {
return invalid_value<string_t>();
}
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
else if (*_cur == ']') {
++_cur;
// empty basic_array
return basic_array<string_t>();
}
typename basic_array<string_t>::raw_array result;
while (true) {
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
if constexpr (accept_jsonc) {
if (*_cur == ']') {
break;
}
}
basic_value<string_t> val = parse_value();
if (!val.valid() || !skip_whitespace()) {
return invalid_value<string_t>();
}
result.emplace_back(std::move(val));
if (*_cur == ',') {
++_cur;
}
else {
break;
}
}
if (skip_whitespace() && *_cur == ']') {
++_cur;
}
else {
return invalid_value<string_t>();
}
return basic_array<string_t>(std::move(result));
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline basic_value<string_t> parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse_object()
{
if (*_cur == '{') {
++_cur;
}
else {
return invalid_value<string_t>();
}
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
else if (*_cur == '}') {
++_cur;
// empty basic_object
return basic_object<string_t>();
}
typename basic_object<string_t>::raw_object result;
while (true) {
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
if constexpr (accept_jsonc) {
if (*_cur == '}') {
break;
}
}
auto key_opt = parse_stdstring();
if (key_opt && skip_whitespace() && *_cur == ':') {
++_cur;
}
else {
return invalid_value<string_t>();
}
if (!skip_whitespace()) {
return invalid_value<string_t>();
}
basic_value<string_t> val = parse_value();
if (!val.valid() || !skip_whitespace()) {
return invalid_value<string_t>();
}
auto emplaced = result.emplace(std::move(*key_opt), std::move(val)).second;
if (!emplaced) {
return invalid_value<string_t>();
}
if (*_cur == ',') {
++_cur;
}
else {
break;
}
}
if (skip_whitespace() && *_cur == '}') {
++_cur;
}
else {
return invalid_value<string_t>();
}
return basic_object<string_t>(std::move(result));
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline std::optional<string_t>
parser<accept_jsonc, string_t, parsing_t, accel_traits>::parse_stdstring()
{
if (*_cur == '"') {
++_cur;
}
else {
return std::nullopt;
}
string_t result;
auto no_escape_beg = _cur;
uint16_t pair_high = 0;
while (_cur != _end) {
if constexpr (sizeof(*_cur) == 1 && accel_traits::available) {
if (!skip_string_literal_with_accel()) {
return std::nullopt;
}
}
switch (*_cur) {
case '\t':
case '\r':
case '\n':
return std::nullopt;
case '\\': {
result += string_t(no_escape_beg, _cur++);
if (_cur == _end) {
return std::nullopt;
}
if (pair_high && *_cur != 'u') {
return std::nullopt;
}
switch (*_cur) {
case '"':
result.push_back('"');
break;
case '\\':
result.push_back('\\');
break;
case '/':
result.push_back('/');
break;
case 'b':
result.push_back('\b');
break;
case 'f':
result.push_back('\f');
break;
case 'n':
result.push_back('\n');
break;
case 'r':
result.push_back('\r');
break;
case 't':
result.push_back('\t');
break;
case 'u':
if (!skip_unicode_escape(pair_high, result)) {
return std::nullopt;
}
break;
default:
// Illegal backslash escape
return std::nullopt;
}
no_escape_beg = ++_cur;
break;
}
case '"': {
if (pair_high) {
return std::nullopt;
}
result += string_t(no_escape_beg, _cur++);
return result;
}
default:
if (pair_high) {
return std::nullopt;
}
++_cur;
break;
}
}
return std::nullopt;
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline bool parser<accept_jsonc, string_t, parsing_t, accel_traits>::skip_unicode_escape(
uint16_t& pair_high,
string_t& result)
{
uint16_t cp = 0;
for (int i = 0; i < 4; ++i) {
if (++_cur == _end) {
return false;
}
if (!std::isxdigit(static_cast<unsigned char>(*_cur))) {
return false;
}
cp <<= 4;
if ('0' <= *_cur && *_cur <= '9') {
cp |= *_cur - '0';
}
else if ('a' <= *_cur && *_cur <= 'f') {
cp |= *_cur - 'a' + 10;
}
else if ('A' <= *_cur && *_cur <= 'F') {
cp |= *_cur - 'A' + 10;
}
else {
return false;
}
}
uint32_t ext_cp = cp;
uint16_t hi_cp = 0, lo_cp = 0;
if (0xD800 <= cp && cp <= 0xDBFF) {
if (pair_high) {
return false;
}
pair_high = cp;
return true;
}
if (0xDC00 <= cp && cp <= 0xDFFF) {
if (!pair_high) {
return false;
}
ext_cp = (((pair_high - 0xD800) << 10) | (cp - 0xDC00)) + 0x10000;
hi_cp = pair_high;
lo_cp = cp;
pair_high = 0;
}
if constexpr (std::is_same_v<typename string_t::value_type, char>) {
// utf8
if (ext_cp <= 0x7F) {
result.push_back(static_cast<char>(ext_cp));
}
else if (ext_cp <= 0x7FF) {
result.push_back(static_cast<char>(((ext_cp >> 6) & 0b00011111) | 0b11000000u));
result.push_back(static_cast<char>((ext_cp & 0b00111111) | 0b10000000u));
}
else if (ext_cp <= 0xFFFF) {
result.push_back(static_cast<char>(((ext_cp >> 12) & 0b00001111) | 0b11100000u));
result.push_back(static_cast<char>(((ext_cp >> 6) & 0b00111111) | 0b10000000u));
result.push_back(static_cast<char>((ext_cp & 0b00111111) | 0b10000000u));
}
else {
result.push_back(static_cast<char>(((ext_cp >> 18) & 0b00000111) | 0b11110000u));
result.push_back(static_cast<char>(((ext_cp >> 12) & 0b00111111) | 0b10000000u));
result.push_back(static_cast<char>(((ext_cp >> 6) & 0b00111111) | 0b10000000u));
result.push_back(static_cast<char>((ext_cp & 0b00111111) | 0b10000000u));
}
}
else if constexpr (std::is_same_v<typename string_t::value_type, wchar_t>) {
if constexpr (sizeof(wchar_t) == 4) {
result.push_back(static_cast<wchar_t>(ext_cp));
}
else if constexpr (sizeof(wchar_t) == 2) {
if (ext_cp <= 0xFFFF) {
result.push_back(static_cast<wchar_t>(ext_cp));
}
else {
result.push_back(static_cast<wchar_t>(hi_cp));
result.push_back(static_cast<wchar_t>(lo_cp));
}
}
else {
static_assert(!sizeof(typename string_t::value_type), "Unsupported wchar");
}
}
else {
static_assert(!sizeof(typename string_t::value_type), "Unsupported type");
}
return true;
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline bool
parser<accept_jsonc, string_t, parsing_t, accel_traits>::skip_string_literal_with_accel()
{
if constexpr (sizeof(*_cur) != 1) {
return false;
}
while (_end - _cur >= accel_traits::step) {
auto pack = accel_traits::load_unaligned(&(*_cur));
auto result = accel_traits::less(pack, 32);
result =
accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('"')));
result =
accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('\\')));
if (accel_traits::is_all_zero(result)) {
_cur += accel_traits::step;
}
else {
auto index = accel_traits::first_nonzero_byte(result);
_cur += index;
break;
}
}
return _cur != _end;
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline bool parser<accept_jsonc, string_t, parsing_t, accel_traits>::skip_whitespace() noexcept
{
while (_cur != _end) {
switch (*_cur) {
case ' ':
case '\t':
case '\r':
case '\n':
++_cur;
break;
case '/':
if constexpr (accept_jsonc) {
if (!skip_comment()) {
return false;
}
// else continue;
}
else {
return false;
}
break;
case '\0':
return false;
default:
return true;
}
}
return false;
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
bool json::parser<accept_jsonc, string_t, parsing_t, accel_traits>::skip_comment() noexcept
{
if (_cur == _end || *_cur != '/') {
return false;
}
if (++_cur == _end) {
return false;
}
enum class comment_type
{
invalid,
line,
block,
} t = comment_type::invalid;
switch (*_cur++) {
case '/':
t = comment_type::line;
break;
case '*':
t = comment_type::block;
break;
default:
return false;
}
while (_cur != _end) {
switch (*_cur++) {
case '\n':
if (t == comment_type::line) {
return true;
}
break;
case '*':
if (t == comment_type::block && _cur != _end && *_cur == '/') {
++_cur;
return true;
}
break;
default:
break;
}
}
// _cur == _end
return t == comment_type::line;
}
template <bool accept_jsonc, typename string_t, typename parsing_t, typename accel_traits>
inline bool parser<accept_jsonc, string_t, parsing_t, accel_traits>::skip_digit()
{
// At least one digit
if (_cur != _end && std::isdigit(*_cur)) {
++_cur;
}
else {
return false;
}
while (_cur != _end && std::isdigit(*_cur)) {
++_cur;
}
if (_cur != _end) {
return true;
}
else {
return false;
}
}
// *************************
// * utils impl *
// *************************
template <typename parsing_t>
auto parse(const parsing_t& content)
{
using string_t = std::basic_string<typename parsing_t::value_type>;
return parser<false, string_t, parsing_t>::parse(content);
}
template <typename char_t>
auto parse(char_t* content)
{
return parse(std::basic_string_view<std::decay_t<char_t>> { content });
}
template <typename istream_t, typename _>
auto parse(istream_t& ifs, bool check_bom, bool with_commets)
{
using string_t = std::basic_string<typename istream_t::char_type>;
ifs.seekg(0, std::ios::end);
auto file_size = ifs.tellg();
ifs.seekg(0, std::ios::beg);
string_t str(file_size, '\0');
ifs.read(str.data(), file_size);
if (check_bom) {
using uchar = unsigned char;
static constexpr uchar Bom_0 = 0xEF;
static constexpr uchar Bom_1 = 0xBB;
static constexpr uchar Bom_2 = 0xBF;
if (str.size() >= 3 && static_cast<uchar>(str.at(0)) == Bom_0
&& static_cast<uchar>(str.at(1)) == Bom_1 && static_cast<uchar>(str.at(2)) == Bom_2) {
str.assign(str.begin() + 3, str.end());
}
}
return with_commets ? parsec(str) : parse(str);
}
template <typename ifstream_t, typename path_t>
auto open(const path_t& filepath, bool check_bom, bool with_commets)
{
using char_t = typename ifstream_t::char_type;
using string_t = std::basic_string<char_t>;
using json_t = json::basic_value<string_t>;
using return_t = std::optional<json_t>;
ifstream_t ifs(filepath, std::ios::in);
if (!ifs.is_open()) {
return return_t(std::nullopt);
}
auto opt = parse(ifs, check_bom, with_commets);
ifs.close();
return opt;
}
template <typename parsing_t>
auto parsec(const parsing_t& content)
{
using string_t = std::basic_string<typename parsing_t::value_type>;
return parser<true, string_t, parsing_t>::parse(content);
}
template <typename char_t>
auto parsec(char_t* content)
{
return parsec(std::basic_string_view<std::decay_t<char_t>> { content });
}
namespace literals
{
inline value operator""_json(const char* str, size_t len)
{
return operator""_jvalue(str, len);
}
inline wvalue operator""_json(const wchar_t* str, size_t len)
{
return operator""_jvalue(str, len);
}
inline value operator""_jvalue(const char* str, size_t len)
{
return parse(std::string_view(str, len)).value_or(value());
}
inline wvalue operator""_jvalue(const wchar_t* str, size_t len)
{
return parse(std::wstring_view(str, len)).value_or(wvalue());
}
inline array operator""_jarray(const char* str, size_t len)
{
auto val = parse(std::string_view(str, len)).value_or(value());
return val.is_array() ? val.as_array() : array();
}
inline warray operator""_jarray(const wchar_t* str, size_t len)
{
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
return val.is_array() ? val.as_array() : warray();
}
inline object operator""_jobject(const char* str, size_t len)
{
auto val = parse(std::string_view(str, len)).value_or(value());
return val.is_object() ? val.as_object() : object();
}
inline wobject operator""_jobject(const wchar_t* str, size_t len)
{
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
return val.is_object() ? val.as_object() : wobject();
}
} // namespace literals
template <typename string_t>
const basic_value<string_t> invalid_value()
{
return basic_value<string_t>(
basic_value<string_t>::value_type::invalid,
typename basic_value<string_t>::var_t());
}
} // namespace json

View File

@@ -1,656 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include <cstddef>
#include <filesystem>
#include <queue>
#include <tuple>
#include <type_traits>
#include <utility>
#include <variant>
#include "../common/types.hpp"
namespace json::ext
{
template <typename string_t, typename impl_t, typename var_t, size_t len> // (size_t)-1 for no
// restriction
class __jsonization_array
{
public:
json::basic_value<string_t> to_json(const var_t& value) const
{
return static_cast<const impl_t*>(this)->to_json_array(value);
}
bool check_json(const json::basic_value<string_t>& json) const
{
if (!json.is_array()) {
return false;
}
const auto& arr = json.as_array();
if constexpr (len != static_cast<size_t>(-1)) {
if (len != arr.size()) {
return false;
}
}
return static_cast<const impl_t*>(this)->check_json_array(arr);
}
bool from_json(const json::basic_value<string_t>& json, var_t& value) const
{
if (!json.is_array()) {
return false;
}
const auto& arr = json.as_array();
if constexpr (len != static_cast<size_t>(-1)) {
if (len != arr.size()) {
return false;
}
}
return static_cast<const impl_t*>(this)->from_json_array(arr, value);
}
json::basic_value<string_t> move_to_json(var_t value) const
{
return static_cast<const impl_t*>(this)->move_to_json_array(std::move(value));
}
bool move_from_json(json::basic_value<string_t> json, var_t& value) const
{
if (!json.is_array()) {
return false;
}
auto& arr = json.as_array();
if constexpr (len != static_cast<size_t>(-1)) {
if (len != arr.size()) {
return false;
}
}
return static_cast<const impl_t*>(this)->move_from_json_array(std::move(arr), value);
}
};
template <typename string_t, typename impl_t, typename var_t>
class __jsonization_object
{
public:
json::basic_value<string_t> to_json(const var_t& value) const
{
return static_cast<const impl_t*>(this)->to_json_object(value);
}
bool check_json(const json::basic_value<string_t>& json) const
{
if (!json.is_object()) {
return false;
}
const auto& obj = json.as_object();
return static_cast<const impl_t*>(this)->check_json_object(obj);
}
bool from_json(const json::basic_value<string_t>& json, var_t& value) const
{
if (!json.is_object()) {
return false;
}
const auto& obj = json.as_object();
return static_cast<const impl_t*>(this)->from_json_object(obj, value);
}
json::basic_value<string_t> move_to_json(var_t value) const
{
return static_cast<const impl_t*>(this)->move_to_json_object(std::move(value));
}
bool move_from_json(json::basic_value<string_t> json, var_t& value) const
{
if (!json.is_object()) {
return false;
}
auto& obj = json.as_object();
return static_cast<const impl_t*>(this)->move_from_json_object(std::move(obj), value);
}
};
template <typename string_t>
class jsonization<string_t, std::nullptr_t>
{
public:
json::basic_value<string_t> to_json(const std::nullptr_t&) const
{
return json::basic_value<string_t> {};
}
bool check_json(const json::basic_value<string_t>& json) const { return json.is_null(); }
bool from_json(const json::basic_value<string_t>& json, std::nullptr_t&)
{
return check_json(json);
}
};
template <typename string_t>
class jsonization<
string_t,
std::filesystem::path,
std::enable_if_t<
std::is_same_v<string_t, std::filesystem::path::string_type>
|| std::is_same_v<string_t, std::string>>>
{
public:
json::basic_value<string_t> to_json(const std::filesystem::path& path) const
{
if constexpr (std::is_same_v<string_t, std::filesystem::path::string_type>) {
return path.native();
}
else if constexpr (std::is_same_v<string_t, std::string>) {
#if __cplusplus >= 202002L
std::u8string u8str = path.u8string();
return std::string { u8str.begin(), u8str.end() };
#else
return path.u8string();
#endif
}
#if __cplusplus >= 202002L
else if constexpr (std::is_same_v<string_t, std::u8string>) {
return path.u8string();
}
#endif
}
bool check_json(const json::basic_value<string_t>& json) const { return json.is_string(); }
bool from_json(const json::basic_value<string_t>& json, std::filesystem::path& path) const
{
path = json.as_string();
return true;
}
};
template <
typename string_t,
template <typename, size_t> typename arr_t,
typename value_t,
size_t size>
class jsonization<string_t, arr_t<value_t, size>>
: public __jsonization_array<
string_t,
jsonization<string_t, arr_t<value_t, size>>,
arr_t<value_t, size>,
size>
{
public:
json::basic_array<string_t> to_json_array(const arr_t<value_t, size>& value) const
{
json::basic_array<string_t> result;
for (size_t i = 0; i < size; i++) {
result.emplace_back(value.at(i));
}
return result;
}
bool check_json_array(const json::basic_array<string_t>& arr) const
{
return arr.template all<value_t>();
}
bool from_json_array(const json::basic_array<string_t>& arr, arr_t<value_t, size>& value) const
{
if (!check_json_array(arr)) {
return false;
}
for (size_t i = 0; i < size; i++) {
value.at(i) = arr[i].template as<value_t>();
}
return true;
}
json::basic_array<string_t> move_to_json_array(arr_t<value_t, size> value) const
{
json::basic_array<string_t> result;
for (size_t i = 0; i < size; i++) {
result.emplace_back(std::move(value.at(i)));
}
return result;
}
bool move_from_json_array(json::basic_array<string_t> arr, arr_t<value_t, size>& value) const
{
if (!check_json_array(arr)) {
return false;
}
for (size_t i = 0; i < size; i++) {
value.at(i) = std::move(arr[i]).template as<value_t>();
}
return true;
}
};
template <typename string_t, typename collection_t>
class jsonization<string_t, collection_t, std::enable_if_t<_utils::is_collection<collection_t>>>
: public __jsonization_array<
string_t,
jsonization<string_t, collection_t>,
collection_t,
(size_t)-1>
{
public:
json::basic_array<string_t> to_json_array(const collection_t& value) const
{
json::basic_array<string_t> result;
for (const auto& val : value) {
result.emplace_back(val);
}
return result;
}
bool check_json_array(const json::basic_array<string_t>& arr) const
{
return arr.template all<typename collection_t::value_type>();
}
bool from_json_array(const json::basic_array<string_t>& arr, collection_t& value) const
{
if (!check_json_array(arr)) {
return false;
}
value = {};
for (const auto& val : arr) {
if constexpr (_utils::has_emplace_back<collection_t>::value) {
value.emplace_back(val.template as<typename collection_t::value_type>());
}
else {
value.emplace(val.template as<typename collection_t::value_type>());
}
}
return true;
}
json::basic_array<string_t> move_to_json_array(collection_t value) const
{
json::basic_array<string_t> result;
for (auto& val : value) {
result.emplace_back(std::move(val));
}
return result;
}
bool move_from_json_array(json::basic_array<string_t> arr, collection_t& value) const
{
if (!check_json_array(arr)) {
return false;
}
for (auto& val : arr) {
if constexpr (_utils::has_emplace_back<collection_t>::value) {
value.emplace_back(std::move(val).template as<typename collection_t::value_type>());
}
else {
value.emplace(std::move(val).template as<typename collection_t::value_type>());
}
}
return true;
}
};
template <typename string_t, template <typename...> typename tuple_t, typename... args_t>
class jsonization<
string_t,
tuple_t<args_t...>,
std::enable_if_t<_utils::is_tuple_like<tuple_t<args_t...>>>>
: public __jsonization_array<
string_t,
jsonization<string_t, tuple_t<args_t...>>,
tuple_t<args_t...>,
std::tuple_size_v<tuple_t<args_t...>>>
{
public:
constexpr static size_t tuple_size = std::tuple_size_v<tuple_t<args_t...>>;
json::basic_array<string_t> to_json_array(const tuple_t<args_t...>& value) const
{
json::basic_array<string_t> result;
to_json_impl(result, value, std::make_index_sequence<tuple_size>());
return result;
}
template <std::size_t... Is>
void to_json_impl(
json::basic_array<string_t>& arr,
const tuple_t<args_t...>& t,
std::index_sequence<Is...>) const
{
using std::get;
(arr.emplace_back(get<Is>(t)), ...);
}
bool check_json_array(const json::basic_array<string_t>& arr) const
{
return check_json_impl(arr, std::make_index_sequence<tuple_size>());
}
template <std::size_t... Is>
bool check_json_impl(const json::basic_array<string_t>& arr, std::index_sequence<Is...>) const
{
return (arr[Is].template is<std::tuple_element_t<Is, tuple_t<args_t...>>>() && ...);
}
bool from_json_array(const json::basic_array<string_t>& arr, tuple_t<args_t...>& value) const
{
if (!check_json_array(arr)) {
return false;
}
from_json_impl(arr, value, std::make_index_sequence<tuple_size>());
return true;
}
template <std::size_t... Is>
void from_json_impl(
const json::basic_array<string_t>& arr,
tuple_t<args_t...>& t,
std::index_sequence<Is...>) const
{
using std::get;
((get<Is>(t) = arr[Is].template as<std::tuple_element_t<Is, tuple_t<args_t...>>>()), ...);
}
json::basic_array<string_t> move_to_json_array(tuple_t<args_t...> value) const
{
json::basic_array<string_t> result;
move_to_json_impl(result, std::move(value), std::make_index_sequence<tuple_size>());
return result;
}
template <std::size_t... Is>
void move_to_json_impl(
json::basic_array<string_t>& arr,
tuple_t<args_t...> t,
std::index_sequence<Is...>) const
{
using std::get;
(arr.emplace_back(std::move(get<Is>(t))), ...);
}
bool move_from_json_array(json::basic_array<string_t> arr, tuple_t<args_t...>& value) const
{
if (!check_json_array(arr)) {
return false;
}
move_from_json_impl(arr, value, std::make_index_sequence<tuple_size>());
return true;
}
template <std::size_t... Is>
void move_from_json_impl(
json::basic_array<string_t> arr,
tuple_t<args_t...>& t,
std::index_sequence<Is...>) const
{
using std::get;
((get<Is>(t) =
std::move(arr[Is]).template as<std::tuple_element_t<Is, tuple_t<args_t...>>>()),
...);
}
};
template <typename string_t, typename map_t>
class jsonization<
string_t,
map_t,
std::enable_if_t<_utils::is_map<map_t> && std::is_same_v<typename map_t::key_type, string_t>>>
: public __jsonization_object<string_t, jsonization<string_t, map_t>, map_t>
{
public:
json::basic_object<string_t> to_json_object(const map_t& value) const
{
json::basic_object<string_t> result;
for (const auto& [key, val] : value) {
result.emplace(key, val);
}
return result;
}
bool check_json_object(const json::basic_object<string_t>& arr) const
{
for (const auto& [key, val] : arr) {
if (!val.template is<typename map_t::mapped_type>()) {
return false;
}
}
return true;
}
bool from_json_object(const json::basic_object<string_t>& arr, map_t& value) const
{
// TODO: 是不是直接from不check了算了
if (!check_json_object(arr)) {
return false;
}
value = {};
for (const auto& [key, val] : arr) {
value.emplace(key, val.template as<typename map_t::mapped_type>());
}
return true;
}
json::basic_object<string_t> move_to_json_object(map_t value) const
{
json::basic_object<string_t> result;
for (auto& [key, val] : value) {
result.emplace(key, std::move(val));
}
return result;
}
bool move_from_json_object(json::basic_object<string_t> arr, map_t& value) const
{
// TODO: 是不是直接from不check了算了
if (!check_json_object(arr)) {
return false;
}
value = {};
for (auto& [key, val] : arr) {
value.emplace(key, std::move(val).template as<typename map_t::mapped_type>());
}
return true;
}
};
template <typename string_t, typename... args_t>
class jsonization<string_t, std::variant<args_t...>>
{
public:
using variant_t = std::variant<args_t...>;
constexpr static size_t variant_size = std::variant_size_v<variant_t>;
json::basic_value<string_t> to_json(const variant_t& value) const
{
json::basic_value<string_t> result;
to_json_impl(result, value, std::make_index_sequence<variant_size>());
return result;
}
template <std::size_t... Is>
void to_json_impl(
json::basic_value<string_t>& val,
const variant_t& t,
std::index_sequence<Is...>) const
{
using std::get;
std::ignore = ((t.index() == Is ? (val = get<Is>(t), true) : false) || ...);
}
bool check_json(const json::basic_value<string_t>& json) const
{
return check_json_impl(json, std::make_index_sequence<variant_size>());
}
template <std::size_t... Is>
bool check_json_impl(const json::basic_value<string_t>& val, std::index_sequence<Is...>) const
{
return (val.template is<std::variant_alternative_t<Is, variant_t>>() || ...);
}
bool from_json(const json::basic_value<string_t>& json, variant_t& value) const
{
if (!check_json_impl(json, std::make_index_sequence<variant_size>())) {
return false;
}
from_json_impl(json, value, std::make_index_sequence<variant_size>());
return true;
}
template <std::size_t... Is>
void from_json_impl(
const json::basic_value<string_t>& json,
variant_t& t,
std::index_sequence<Is...>) const
{
std::ignore =
((json.template is<std::variant_alternative_t<Is, variant_t>>()
? (t = json.template as<std::variant_alternative_t<Is, variant_t>>(), true)
: false)
|| ...);
}
json::basic_value<string_t> move_to_json(variant_t value) const
{
json::basic_value<string_t> result;
move_to_json_impl(result, std::move(value), std::make_index_sequence<variant_size>());
return result;
}
template <std::size_t... Is>
void
move_to_json_impl(json::basic_value<string_t>& val, variant_t t, std::index_sequence<Is...>)
const
{
using std::get;
std::ignore = ((t.index() == Is ? (val = std::move(get<Is>(t)), true) : false) || ...);
}
bool move_from_json(json::basic_value<string_t> json, variant_t& value) const
{
if (!check_json_impl(json, std::make_index_sequence<variant_size>())) {
return false;
}
move_from_json_impl(std::move(json), value, std::make_index_sequence<variant_size>());
return true;
}
template <std::size_t... Is>
void move_from_json_impl(
json::basic_value<string_t> json,
variant_t& t,
std::index_sequence<Is...>) const
{
std::ignore =
((json.template is<std::variant_alternative_t<Is, variant_t>>()
? (t = std::move(json).template as<std::variant_alternative_t<Is, variant_t>>(),
true)
: false)
|| ...);
}
};
// TODO: check if has move_xxx in member
template <typename string_t, typename var_t>
class jsonization<
string_t,
var_t,
std::enable_if_t<
_utils::has_to_json_in_member<var_t>::value
&& _utils::has_check_json_in_member<var_t, string_t>::value
&& _utils::has_from_json_in_member<var_t, string_t>::value>>
{
public:
json::basic_value<string_t> to_json(const var_t& value) const { return value.to_json(); }
bool check_json(const json::basic_value<string_t>& json) const
{
var_t value;
return value.check_json(json);
}
bool from_json(const json::basic_value<string_t>& json, var_t& value) const
{
return value.from_json(json);
}
json::basic_value<string_t> move_to_json(var_t value) const { return to_json(value); }
bool move_from_json(json::basic_value<string_t> json, var_t& value) const
{
return from_json(json, value);
}
};
// really need this fucking queue?
template <typename string_t, typename value_t>
class jsonization<string_t, std::queue<value_t>>
: public __jsonization_array<
string_t,
jsonization<string_t, std::queue<value_t>>,
std::queue<value_t>,
(size_t)-1>
{
public:
json::basic_array<string_t> to_json_array(const std::queue<value_t>& value) const
{
return move_to_json_array(value);
}
bool check_json_array(const json::basic_array<string_t>& arr) const
{
return arr.template all<value_t>();
}
bool from_json_array(const json::basic_array<string_t>& arr, std::queue<value_t>& value) const
{
if (!check_json_array(arr)) {
return false;
}
value = {};
for (const auto& val : arr) {
value.emplace(val.template as<value_t>());
}
return true;
}
json::basic_array<string_t> move_to_json_array(std::queue<value_t> value) const
{
json::basic_array<string_t> result;
while (!value.empty()) {
result.emplace_back(std::move(value.front()));
value.pop();
}
return result;
}
bool move_from_json_array(json::basic_array<string_t> arr, std::queue<value_t>& value) const
{
if (!check_json_array(arr)) {
return false;
}
for (auto& val : arr) {
value.emplace(std::move(val).template as<value_t>());
}
return true;
}
};
}

View File

@@ -1,648 +0,0 @@
// IWYU pragma: private, include <meojson/json.hpp>
#pragma once
#include <string>
#include <type_traits>
#include <utility>
#include "../common/types.hpp"
#include "extensions.hpp"
namespace json::_jsonization_helper
{
template <typename value_t>
struct is_optional_t : public std::false_type
{
};
template <typename value_t>
struct is_optional_t<std::optional<value_t>> : public std::true_type
{
};
template <typename value_t>
inline constexpr bool is_optional_v = is_optional_t<value_t>::value;
struct next_is_optional_t
{
};
struct next_override_key_t
{
const char* key;
};
struct next_state_t
{
bool is_optional = false;
const char* override_key = nullptr;
};
struct va_arg_end
{
};
template <typename tag_t>
struct is_tag_t : public std::false_type
{
};
template <>
struct is_tag_t<next_is_optional_t> : public std::true_type
{
};
template <>
struct is_tag_t<next_override_key_t> : public std::true_type
{
};
struct dumper
{
void _to_json(json::object&, va_arg_end) const {}
template <typename... rest_t>
void _to_json(json::object& result, const char* key, rest_t&&... rest) const
{
_to_json(result, next_state_t {}, key, std::forward<rest_t>(rest)...);
}
template <
typename var_t,
typename... rest_t,
typename _ = std::enable_if_t<!is_tag_t<var_t>::value, void>>
void _to_json(
json::object& result,
next_state_t state,
const char* key,
const var_t& var,
rest_t&&... rest) const
{
if (state.override_key) {
key = state.override_key;
}
if constexpr (is_optional_v<var_t>) {
if (!state.is_optional) {
throw exception("std::optional must be used with MEO_OPT");
}
if (var.has_value()) {
result.emplace(key, var.value());
}
}
else {
result.emplace(key, var);
}
_to_json(result, std::forward<rest_t>(rest)...);
}
template <typename... rest_t>
void _to_json(
json::object& result,
next_state_t state,
const char*,
next_is_optional_t,
rest_t&&... rest) const
{
state.is_optional = true;
_to_json(result, state, std::forward<rest_t>(rest)...);
}
template <typename... rest_t>
void _to_json(
json::object& result,
next_state_t state,
const char*,
next_override_key_t override_key,
rest_t&&... rest) const
{
state.override_key = override_key.key;
_to_json(result, state, std::forward<rest_t>(rest)...);
}
};
struct checker
{
bool _check_json(const json::value&, std::string&, va_arg_end) const { return true; }
template <typename... rest_t>
bool _check_json(
const json::value& in,
std::string& error_key,
const char* key,
rest_t&&... rest) const
{
return _check_json(in, error_key, next_state_t {}, key, std::forward<rest_t>(rest)...);
}
template <
typename var_t,
typename... rest_t,
typename _ = std::enable_if_t<!is_tag_t<var_t>::value, void>>
bool _check_json(
const json::value& in,
std::string& error_key,
next_state_t state,
const char* key,
const var_t&,
rest_t&&... rest) const
{
if (state.override_key) {
key = state.override_key;
}
auto opt = in.find(key);
if constexpr (is_optional_v<var_t>) {
if (!state.is_optional) {
throw exception("std::optional must be used with MEO_OPT");
}
if (opt && !opt->is<typename var_t::value_type>()) {
error_key = key;
return false;
}
}
else {
if (state.is_optional) {
if (opt && !opt->is<var_t>()) {
error_key = key;
return false;
} // is_optional, ignore key not found
}
else if (!opt || !opt->is<var_t>()) {
error_key = key;
return false;
}
}
return _check_json(in, error_key, std::forward<rest_t>(rest)...);
}
template <typename... rest_t>
bool _check_json(
const json::value& in,
std::string& error_key,
next_state_t state,
const char*,
next_is_optional_t,
rest_t&&... rest) const
{
state.is_optional = true;
return _check_json(in, error_key, state, std::forward<rest_t>(rest)...);
}
template <typename... rest_t>
bool _check_json(
const json::value& in,
std::string& error_key,
next_state_t state,
const char*,
next_override_key_t override_key,
rest_t&&... rest) const
{
state.override_key = override_key.key;
return _check_json(in, error_key, state, std::forward<rest_t>(rest)...);
}
};
struct loader
{
bool _from_json(const json::value&, std::string&, va_arg_end) const { return true; }
template <typename... rest_t>
bool
_from_json(const json::value& in, std::string& error_key, const char* key, rest_t&&... rest)
{
return _from_json(in, error_key, next_state_t {}, key, std::forward<rest_t>(rest)...);
}
template <
typename var_t,
typename... rest_t,
typename _ = std::enable_if_t<!is_tag_t<var_t>::value, void>>
bool _from_json(
const json::value& in,
std::string& error_key,
next_state_t state,
const char* key,
var_t& var,
rest_t&&... rest)
{
if (state.override_key) {
key = state.override_key;
}
auto opt = in.find(key);
if constexpr (is_optional_v<var_t>) {
if (!state.is_optional) {
throw exception("std::optional must be used with MEO_OPT");
}
if (opt && !opt->is<typename var_t::value_type>()) {
error_key = key;
return false;
}
if (opt) {
var = std::move(opt)->as<typename var_t::value_type>();
}
else {
var = std::nullopt;
}
}
else {
if (state.is_optional) {
if (opt && !opt->is<var_t>()) {
error_key = key;
return false;
} // is_optional, ignore key not found
}
else if (!opt || !opt->is<var_t>()) {
error_key = key;
return false;
}
if (opt) {
var = std::move(opt)->as<var_t>();
}
}
return _from_json(in, error_key, std::forward<rest_t>(rest)...);
}
template <typename... rest_t>
bool _from_json(
const json::value& in,
std::string& error_key,
next_state_t state,
const char*,
next_is_optional_t,
rest_t&&... rest)
{
state.is_optional = true;
return _from_json(in, error_key, state, std::forward<rest_t>(rest)...);
}
template <typename... rest_t>
bool _from_json(
const json::value& in,
std::string& error_key,
next_state_t state,
const char*,
next_override_key_t override_key,
rest_t&&... rest)
{
state.override_key = override_key.key;
return _from_json(in, error_key, state, std::forward<rest_t>(rest)...);
}
};
} // namespace json::_jsonization_helper
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#endif
namespace json::_private_macro
{
#define _MEOJSON_STRINGIZE(arg) _MEOJSON_STRINGIZE1(arg)
#define _MEOJSON_STRINGIZE1(arg) _MEOJSON_STRINGIZE2(arg)
#define _MEOJSON_STRINGIZE2(arg) #arg
#define _MEOJSON_CONCATENATE(arg1, arg2) _MEOJSON_CONCATENATE1(arg1, arg2)
#define _MEOJSON_CONCATENATE1(arg1, arg2) _MEOJSON_CONCATENATE2(arg1, arg2)
#define _MEOJSON_CONCATENATE2(arg1, arg2) arg1##arg2
#define _MEOJSON_EXPAND(x) x
#define _MEOJSON_FOR_EACH_1(pred, x) pred(x)
#define _MEOJSON_FOR_EACH_2(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_1(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_3(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_2(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_4(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_3(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_5(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_4(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_6(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_5(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_7(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_6(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_8(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_7(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_9(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_8(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_10(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_9(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_11(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_10(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_12(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_11(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_13(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_12(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_14(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_13(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_15(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_14(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_16(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_15(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_17(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_16(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_18(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_17(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_19(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_18(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_20(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_19(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_21(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_20(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_22(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_21(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_23(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_22(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_24(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_23(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_25(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_24(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_26(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_25(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_27(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_26(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_28(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_27(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_29(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_28(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_30(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_29(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_31(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_30(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_32(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_31(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_33(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_32(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_34(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_33(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_35(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_34(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_36(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_35(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_37(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_36(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_38(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_37(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_39(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_38(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_40(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_39(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_41(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_40(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_42(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_41(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_43(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_42(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_44(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_43(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_45(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_44(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_46(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_45(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_47(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_46(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_48(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_47(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_49(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_48(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_50(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_49(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_51(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_50(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_52(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_51(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_53(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_52(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_54(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_53(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_55(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_54(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_56(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_55(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_57(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_56(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_58(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_57(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_59(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_58(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_60(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_59(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_61(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_60(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_62(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_61(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_63(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_62(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH_64(pred, x, ...) \
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_63(pred, __VA_ARGS__))
#define _MEOJSON_ARG_COUNT(...) \
_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT1( \
0, \
##__VA_ARGS__, \
64, \
63, \
62, \
61, \
60, \
59, \
58, \
57, \
56, \
55, \
54, \
53, \
52, \
51, \
50, \
49, \
48, \
47, \
46, \
45, \
44, \
43, \
42, \
41, \
40, \
39, \
38, \
37, \
36, \
35, \
34, \
33, \
32, \
31, \
30, \
29, \
28, \
27, \
26, \
25, \
24, \
23, \
22, \
21, \
20, \
19, \
18, \
17, \
16, \
15, \
14, \
13, \
12, \
11, \
10, \
9, \
8, \
7, \
6, \
5, \
4, \
3, \
2, \
1, \
0))
#define _MEOJSON_ARG_COUNT1( \
_0, \
_1, \
_2, \
_3, \
_4, \
_5, \
_6, \
_7, \
_8, \
_9, \
_10, \
_11, \
_12, \
_13, \
_14, \
_15, \
_16, \
_17, \
_18, \
_19, \
_20, \
_21, \
_22, \
_23, \
_24, \
_25, \
_26, \
_27, \
_28, \
_29, \
_30, \
_31, \
_32, \
_33, \
_34, \
_35, \
_36, \
_37, \
_38, \
_39, \
_40, \
_41, \
_42, \
_43, \
_44, \
_45, \
_46, \
_47, \
_48, \
_49, \
_50, \
_51, \
_52, \
_53, \
_54, \
_55, \
_56, \
_57, \
_58, \
_59, \
_60, \
_61, \
_62, \
_63, \
_64, \
N, \
...) \
N
#define _MEOJSON_FOR_EACH_(N, pred, ...) \
_MEOJSON_EXPAND(_MEOJSON_CONCATENATE(_MEOJSON_FOR_EACH_, N)(pred, __VA_ARGS__))
#define _MEOJSON_FOR_EACH(pred, ...) \
_MEOJSON_EXPAND( \
_MEOJSON_FOR_EACH_(_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT(__VA_ARGS__)), pred, __VA_ARGS__))
#define _MEOJSON_VARNAME(x) _MEOJSON_CONCATENATE(_meojson_jsonization_, x)
#define _MEOJSON_KEY_VALUE(x) _MEOJSON_STRINGIZE(x), x,
} // namespace json::_private_macro
#define MEO_TOJSON(...) \
json::value to_json() const \
{ \
json::object result; \
json::_jsonization_helper::dumper()._to_json( \
result, \
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
json::_jsonization_helper::va_arg_end {}); \
return result; \
}
#define MEO_CHECKJSON(...) \
bool check_json(const json::value& _MEOJSON_VARNAME(in)) const \
{ \
std::string _MEOJSON_VARNAME(error_key); \
return check_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
} \
bool check_json( \
const json::value& _MEOJSON_VARNAME(in), \
std::string& _MEOJSON_VARNAME(error_key)) const \
{ \
return json::_jsonization_helper::checker()._check_json( \
_MEOJSON_VARNAME(in), \
_MEOJSON_VARNAME(error_key), \
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
json::_jsonization_helper::va_arg_end {}); \
}
#define MEO_FROMJSON(...) \
bool from_json(const json::value& _MEOJSON_VARNAME(in)) \
{ \
std::string _MEOJSON_VARNAME(error_key); \
return from_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
} \
bool from_json( \
const json::value& _MEOJSON_VARNAME(in), \
std::string& _MEOJSON_VARNAME(error_key)) \
{ \
return json::_jsonization_helper::loader()._from_json( \
_MEOJSON_VARNAME(in), \
_MEOJSON_VARNAME(error_key), \
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
json::_jsonization_helper::va_arg_end {}); \
}
#define MEO_JSONIZATION(...) \
_MEOJSON_EXPAND(MEO_TOJSON(__VA_ARGS__)) \
_MEOJSON_EXPAND(MEO_CHECKJSON(__VA_ARGS__)) \
_MEOJSON_EXPAND(MEO_FROMJSON(__VA_ARGS__))
#define MEO_OPT json::_jsonization_helper::next_is_optional_t {},
#define MEO_KEY(key) json::_jsonization_helper::next_override_key_t { key },
#if defined(__clang__)
#pragma clang diagnostic pop // -Wgnu-zero-variadic-macro-arguments
#endif

View File

@@ -1,49 +1,257 @@
## v5.26.0-beta.1
## v6.2.2
### Highlights
随着米诺斯 SS 的到来,我们迎来了一位全新的萨尔贡六星干员,~~那么牛牛的米诺斯大C在哪呢~~
#### 日志侧边栏重构
本次更新我们对主页日志侧边栏进行了整体重构,统一并优化了布局与视觉样式。
现在你可以在「设置 → 界面设置」中控制【使用卡片样式日志】设置来切换日志样式,控制【日志缩略图最大数量】设置来决定日志侧边栏的缩略图数量上限(这些缩略图都是临时保存在内存里的,**内存较小的用户可能需要调整数量**
#### 自动战斗优化
我们优化了自动战斗功能的作业路径下拉选择栏,现在同一个任务的本地作业将会折叠在一起,大幅度提升了下拉选择栏的可读性。
另外,本次游戏更新 yj 修改了暂停按钮的位置,我们已经通过热更新修复该问题,本次更新 MAA 也会合并此项修复。
#### 今日关卡提示优化
今日关卡提示中的掉落信息现已支持同步显示对应的库存数量,便于在刷图规划时快速判断材料缺口与优先级。
你可通过「小工具 → 仓库识别」更新库存数量,今日关卡提示中的掉落信息会自动同步更新。
#### 基建与线索管理优化
我们在「一键长草 → 基建换班 → 高级设置」里新增了【进行线索交流】【赠送线索】两项独立开关设置,提升基建管理的灵活性。
我们也优化了一键赠送线索等的逻辑,减少误操作发生的可能性。
同时,在基建进入设施失败时牛牛将自动保留测试截图,便于后续问题的定位与排查。
#### 成就系统 DLC
我们新增了一些成就,覆盖多个场景,等你探索哦~
----
#### Log Sidebar Redesign
In this update, we've completely redesigned the main page log sidebar, unifying and optimizing its layout and visual style.
You can now switch log styles by controlling the *Use card style log* setting in *Settings → GUI*, and control the *Maximum number of log thumbnails* setting to determine the maximum number of thumbnails in the log sidebar (these thumbnails are temporarily stored in memory, **users with limited memory may need to adjust the number**).
#### *Copilot* Optimization
We've optimized the task path dropdown selection bar for the *Copilot*. Local tasks for the same stage will now be collapsed together, significantly improving the readability of the dropdown selection bar.
Additionally, the game update changed the position of the pause button. We have fixed this issue through a hot update, and this fix has been merged into the MAA update.
#### *Today's open stages* Hint Optimization
The drop information in the *Today's open stages* hints now supports synchronous display of the corresponding depot quantity, making it easier to quickly determine material shortages and priorities when planning your stage runs.
You can update your depot info through *Toolbox → Depot*, and the daily drop information in the *Today's open stages* hints will be automatically updated.
#### *Base* and Clue Management Optimizations
We've added two independent toggle settings for *Conduct Clue Exchange* and *Send Clues* in *Farming → Base → Advanced*, improving the flexibility of *Base* management.
We've also optimized the logic for one-click clue sending, reducing the possibility of accidental operations.
Additionally, when *Base* entry fails, MAA will automatically save a test screenshot for easier troubleshooting and identification of subsequent issues.
#### Achievement System DLC
We've added some achievements covering multiple scenarios, waiting for you to explore!
----
以下是详细内容:
## v6.2.2
### 新增 | New
* 次生预案十里坡剑神 @ABA2396
* 设置指引添加更新设置 @ABA2396
* 设置指引添加性能设置 @ABA2396
* 只有一个配置时标题栏隐藏配置名 @ABA2396
* 检查更新失败时吐司通知 @ABA2396
* 新增截图增强模拟器路径的选择窗口 @ABA2396
* 自动战斗-自动编队支持技能等级要求 (#15355) @status102
* 设置指引中添加使用指引页 @ABA2396
### 改进 | Improved
* 调整 ViewModels 目录结构,规范 ViewModels 命名 (#15389) @ABA2396
* 优化动画效果 @ABA2396
* 优化仓库识别二值化阈值 @ABA2396
* 悬浮窗改 static @status102
### 修复 | Fix
* 文档首页语言选择按钮的宽度定义方式 (#14199) @lucienshawls
* 傀影肉鸽无法识别四结局 (#14193) @Saratoga-Official
* GamePassSkip2 识别到错误的跳过 @Saratoga-Official
* 萨米肉鸽不期而遇避战 @Saratoga-Official
* Google Play Games Developer shutdown @Constrat
* manual set resource version time @MistEO
* prettier @Constrat
* 界园指挥避战刷钱增加黑屏等待 @Saratoga-Official
* 有猪把成就注释掉了 @ABA2396
* 修复特殊路径下执行 adb 命令可能失败的问题 (#15381) (#15382) @sylw114
* 修复 TaskDialog 按钮文本赋值时的语法错误及空引用保护 (#15377) @hcl55
* 修复牛牛抽卡点击停止之后文字提示不会停止变化 @ABA2396
* 仓库数据 parse 失败时返回空数据 @ABA2396
* 修复肉鸽快速编队按钮边缘无法点击导致出错 @Saratoga-Official
* 修复矿石"杀手"识别 @Saratoga-Official
* 肉鸽增加黑屏等待时间 @Saratoga-Official
* 悖论模拟-作业列表额外等待 @status102
* 修复构建警告 @ABA2396
* 收到关卡名识别失败回调时更新卡片 @ABA2396
* Fix phantom puppet not deploying @Constrat
* Fix AT ClickStage t -> T @Constrat
* Add AsstGetImageBgr to wine shim @dantmnf
### 文档 | Docs
* 补充vsc插件繁中文档 @Rbqwow
* 修复文档站 readme 盾换行 @Rbqwow
* 调整文档站的标题和尾注文本显示 (#14213) @lucienshawls
* 更新网页开发相关文档 (#14167) @Rbqwow @Manicsteiner
* 完善任务流程协议文档 (#13232) @zzyyyl
* 回调消息协议文档视觉更新 @SherkeyXD
* 集成文档视觉更新 @SherkeyXD
* 文档启用 b 站视频播放功能 @SherkeyXD
* 文档添加字段容器功能 @SherkeyXD
* 文档添加功能 @SherkeyXD
* 更新文档编写指南 @SherkeyXD
* 标题 MAA 统一采用缩写 @MistEO
* 再次调整文档站标题( @MistEO
* 调整文档站标题 @MistEO
* Update JP(#14227) @wallsman
* markdown pre-commit @zzyyyl
* add extension's evaluating feature @neko-para
* add telegram icon @SherkeyXD
* 更新开发指南 @ABA2396
* Update cli usage.md with Windows installation note (#15369) @JasonHuang79
### 其他 | Other
* 统一显示效果 @ABA2396
* 水月萨米肉鸽不期而遇避战 @Saratoga-Official
* 重写完成后动作仅一次的 ui 字符串 (#14196) @Rbqwow
* 贸易站没其他好用的人再用锏 @ABA2396
* YostarJP Sarkaz roguelike StageEncounter (#14223) @Manicsteiner
* YostarJP sami roguelike 720p (#14210) @Manicsteiner
* YostarJP Mizuki StageEncounter (#14206) @Manicsteiner
* devcontainer.json (#14169) @Rbqwow @lucienshawls
* 快捷置入显示加点判断日志 @ABA2396
* 制造站加入苍苔组,避免苍苔与阿罗玛冲突 (#15343) @drway
* 地块类型标注 TileType (#15373) @status102
* 抽卡任务结束后提示还原为默认 @ABA2396
* 一图流上报 id 单独实现 @ABA2396
* EN tweak to inventory display @Constrat
* AT updates @Constrat
* YostarJP AT updates @Manicsteiner
* YostarKR AT updates @HX3N
* Preload AT + new alter operators regex for EN @Constrat
* YostarJP AT preload and ocr edit @Manicsteiner
* Update OrundumActivities for EN @Constrat
## v6.2.1
### 新增 | New
* 公告界面触屏滚动 @ABA2396
* 拆分 debug 和 report 文件夹逻辑 @ABA2396
### 改进 | Improved
* 自动检测地图是否为多阶段地图, 判断是否需要使用 view[0].x 修正镜头 (#15371) @status102
* 优化下拉框逻辑 @ABA2396
* 用妖法实现了自动战斗下拉框的失焦和收起按钮 @ABA2396
### 修复 | Fix
* 游戏更新后结算黑屏时长大幅增加,导致肉鸽结算失败 @ABA2396
* 增加理智战斗后点击到掉落列表的重试次数,避免延长的黑屏时间影响 @ABA2396
* 将借助战打 OF-1 的任务结束后最大等待时间翻倍,避免延长的黑屏时间影响 @ABA2396
* 肉鸽推荐设置文本 (#15370) @ABA2396 @Saratoga-Official
* 自动战斗-悖论模拟 中文路径作业 解析作业失败 @status102
* 肉鸽重试时误点进招募界面 @Saratoga-Official
* 移除 ExceptionStacktrace.hpp @status102
* 收取好友线索延迟 @ABA2396
### 文档 | Docs
* 更新 Visual C++ 可再发行程序包链接至 V14 版本 (#15360) @wryx166
### 其他 | Other
* 调整战斗结束后的点击位置 @ABA2396
* 悖论模拟自动战斗任务翻译 @ABA2396
## v6.2.0
### 新增 | New
* 重构仓库识别结构,支持根据关卡掉落情况自动更新 (#15358) @ABA2396
* 成就 DLC 功能 (#15288) @ABA2396
* 增强自动战斗文件选择功能,支持多级路径和相对目录 (#15174) @momomochi987 @ABA2396
* 允许设置是否启用线索交流与赠送线索 (#15278) @ABA2396
* 增加冬时至基建温蒂组并调整温蒂组选人逻辑 (#15294) @drway
* 通知渠道添加 Gotify (#15284) @2436238575
* 给 Bark 通知添加默认的分类组 (#15244) @Anselyuki
* 重构主页日志侧边栏整体布局和样式 (#15211) @MistEO @ABA2396
* 支持日志样式切换 @ABA2396
* 基建设施缩略图 @ABA2396
* 自动战斗日志栏添加日志悬浮窗按钮 @ABA2396
* 关卡提示支持显示库存 @ABA2396
* 更新库存提示移到 ToolTip @ABA2396
* 可以点击 20 次按钮关闭公告弹窗 @ABA2396
* 日志允许图片更新时不添加内容 @ABA2396
* 限制使用 CPU 推理时的线程占用数,优先保证模拟器运行 @ABA2396
* 基建进入设施失败时保留测试截图 @ABA2396
* 将自动重载资源独立出来,在 debug 模式下显示勾选框 @ABA2396
* 尝试增加 B 服开屏活动跳过 @ABA2396
* 检测到自身处于临时路径中时阻止启动 (#14961) @Rbqwow @ABA2396
* 企鹅物流上报 ID 不为空时禁止被上报结果赋值 @ABA2396
* 新增肉鸽主题推荐配置 tip 并适配多语言 (#15324) @hcl55 @HX3N @Manicsteiner @Constrat @momomochi987 @ABA2396
* SideStory 「雅赛努斯复仇记」导航 @SherkeyXD
* Disable CoreML for detection and recognition on macOS @MistEO
### 改进 | Improved
* 重构自动战斗标签页逻辑,拆分悖论模拟任务 (#15327) @ABA2396 @yali-hzy @status102 @HX3N @Constrat
* 刷理智任务指定次数与代理倍率冲突提醒 (#15233) @status102 @HX3N @momomochi987 @Manicsteiner
* 优化线索交流、获取好友线索逻辑 @ABA2396
* 优化界面显示效果与换行 @ABA2396
* 优化缩略图逻辑 @ABA2396
* 优化 PropertyDependsOnHelper 实现 @ABA2396
* 将 PropertyDependsOnViewModel 改为静态工具类 @ABA2396
* 调整缩略图 ToolTip 延迟 @ABA2396
* 在禁用时 TooltipBlock 显示特效 (#15260) @yali-hzy @ABA2396
* 重命名以符合文件结构 @ABA2396
* devcontainer 从 conda 迁移至 mise/uv (#15251) @SherkeyXD
* rename Dps to Ops (#15325) @ABA2396
### 修复 | Fix
* 界园肉鸽因点击模板边缘导致关卡进不去 @Saratoga-Official
* 肉鸽暂停按钮更新 @ABA2396
* 20260109 游戏更新导致自动战斗失效 @status102
* 同时开启「剿灭模式」和「备选关卡」会导致「企鹅物流汇报 ID」被修改 @ABA2396
* 无法通过删除自动战斗输入框内容清除当前作业,无法通过在输入框输入神秘代码直接开始战斗 @ABA2396
* 线索数量识别 @ABA2396
* 线索板上有线索时无法一键放置线索 @ABA2396
* 肉鸽未填写开局干员时借助战强制为 false @ABA2396
* 隐秘战线结局识别 @ABA2396
* 隐秘战线识别到多余字符时无法进入对应事件 @ABA2396
* 给缺失干员检查补上 Unavailable (#15296) @Alan-Charred
* 尝试修复基建效率计算中的 out_of_range 异常 @ABA2396
* 远程控制截图无法获取最新图像 (#15276) @Hakuin123
* Debug 图片保存目录 (#15250) @hguandl
* 修复文档站搜索问题 @SherkeyXD
* 鬼影迷踪 -> 诡影迷踪 @ABA2396
* 撷英调香师 @ABA2396
* 避免其他 locale 下,掉落次数误认数字字符 (#15306) @aflyhorse
* ai review @ABA2396
* Filename too long @Daydreamer114
* update DormMini.png for EN (again) @Constrat
* fix SA1518 warnings @Constrat
* SA1633 warning missing copyright notice @Constrat
* waydroid rawbync screencap 2>/dev/null (#15196) @commondservice
### 文档 | Docs
* 使用脚本一键安装 maa-cli (#15283) @wangl-cc
* 战斗协议 移动镜头 (#15261) @Daydreamer114
* 源码链接同步最新行数 @Rbqwow
* 中文集成文档统一格式 @ABA2396
* update KR documents (#15282) @HX3N
* update vsc ext docs for quick ocr (#15298) @neko-para @HX3N @Constrat
### 其他 | Other
* 移除地图未修复期间的临时糊屎, 移除未更正的注释 @status102
* 添加雪猎基建技能加成 @Saratoga-Official
* 调整文件夹判断逻辑 @ABA2396
* 调整注释 @ABA2396
* 调整 MaxNumberOfLogThumbnails 作用域,调整默认数量 @ABA2396
* 微调公告确认按钮位置 @SherkeyXD
* 移除多余关卡 @SherkeyXD
* 添加挂调试器下使用 GPU 的注释 @ABA2396
* add IsDebugVersion to _forcedReloadResource (#15293) @Constrat
* port changes from api @SherkeyXD
* H16-4, 引航者 #6 TN-1~TN-4 剩余地图 view[1] @status102
* YostarKR tweak AS-OpenOcr @HX3N
* YostarJP roguelike JieGarden ocr edit @Manicsteiner
* YoStarJP SN device ocr (#15310) @cheriu
* EN for `FightTimesMayNotExhausted` @Constrat

View File

@@ -1,12 +1,7 @@
cmake_minimum_required(VERSION 3.28)
project(MAA)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
option(BUILD_WPF_GUI "build MaaWpfGui" ${WIN32})
option(BUILD_DEBUG_DEMO "build debug demo" OFF)
option(BUILD_XCFRAMEWORK "build xcframework for macOS app" OFF)
@@ -17,29 +12,23 @@ option(INSTALL_FLATTEN "do not use bin lib include directory" ON)
option(WITH_EMULATOR_EXTRAS "build with emulator extras" ${WIN32})
option(WITH_HASH_VERSION "generate version from git hash" OFF)
include(${PROJECT_SOURCE_DIR}/MaaDeps/maadeps.cmake)
if(INSTALL_FLATTEN)
set(RPATH_LIBRARY_INSTALL_DIR .)
set(MaaCore_install_flatten_args RUNTIME DESTINATION . LIBRARY DESTINATION . PUBLIC_HEADER DESTINATION .)
endif()
include(src/MaaUtils/MaaUtils.cmake)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
include(${PROJECT_SOURCE_DIR}/cmake/config.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
if(APPLE)
include(${PROJECT_SOURCE_DIR}/cmake/macos.cmake)
endif()
if(INSTALL_FLATTEN)
set(MaaCore_install_flatten_args RUNTIME DESTINATION . LIBRARY DESTINATION . PUBLIC_HEADER DESTINATION .)
endif()
add_library(HeaderOnlyLibraries INTERFACE)
target_include_directories(HeaderOnlyLibraries INTERFACE 3rdparty/include)
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs)
find_package(Boost REQUIRED CONFIG COMPONENTS system)
find_package(ZLIB REQUIRED)
find_package(fastdeploy_ppocr REQUIRED)
find_package(ONNXRuntime REQUIRED)
add_subdirectory(src/MaaCore)
if(BUILD_WPF_GUI)

View File

@@ -21,6 +21,9 @@
<img alt="stars" src="https://img.shields.io/github/stars/MaaAssistantArknights/MaaAssistantArknights?style=social">
<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/MaaAssistantArknights/MaaAssistantArknights/total?style=social">
</div>
<div>
<a href="https://deepwiki.com/MaaAssistantArknights/MaaAssistantArknights"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
</div>
<br>
<!-- markdownlint-restore -->
@@ -43,7 +46,7 @@ MAA 的意思是 MAA Assistant Arknights
## 亮点功能
- 理智,掉落识别及上传 [企鹅物流](https://penguin-stats.cn/)[一图流](https://ark.yituliu.cn/)
- 理智作战,掉落识别及上传 [企鹅物流](https://penguin-stats.cn/)[一图流](https://ark.yituliu.cn/)
- 智能基建换班,自动计算干员效率,单设施内最优解;同时也支持 [自定义排班](https://docs.maa.plus/zh-cn/protocol/base-scheduling-schema.html)
- 自动公招,可选使用加急许可,一次全部刷完!公招数据自动上传 [企鹅物流](https://penguin-stats.cn/result/stage/recruit/recruit)[一图流](https://ark.yituliu.cn/survey/maarecruitdata)
- 支持手动识别公招界面,方便对高星公招做出选择 ~~(你的这个高资回费出的是推王呢还是推王呢)~~
@@ -98,11 +101,9 @@ MAA 支持命令行界面CLI操作支持 LinuxmacOS 和 Windows
### 主要关联项目
**目前项目组非常缺前端大佬,若您有相关经验,欢迎加入我们!**
- 全新框架:[MaaFramework](https://github.com/MaaXYZ/MaaFramework)
- [作业站](https://prts.plus) 前端:[maa-copilot-frontend](https://github.com/MaaAssistantArknights/maa-copilot-frontend)
- [作业站](https://prts.plus) 后端:[MaaBackendCenter](https://github.com/MaaAssistantArknights/MaaBackendCenter)
- [作业站](https://prts.plus) 前端:[zoot-plus-frontend](https://github.com/ZOOT-Plus/zoot-plus-frontend)
- [作业站](https://prts.plus) 后端:[ZootPlusBackend](https://github.com/ZOOT-Plus/ZootPlusBackend)
- [官网](https://maa.plus)[前端](https://github.com/MaaAssistantArknights/maa-website)
- 深度学习:[MaaAI](https://github.com/MaaAssistantArknights/MaaAI)
@@ -112,15 +113,9 @@ MAA 以中文(简体)为第一语言,翻译词条均以中文(简体)
### 参与开发
#### Windows
请参阅 [开发指南](https://docs.maa.plus/zh-cn/develop/development.html)。
请参阅 [开始开发](https://docs.maa.plus/zh-cn/develop/development.html)。
#### Linux | macOS
请参阅 [Linux 编译教程](https://docs.maa.plus/zh-cn/develop/linux-tutorial.html)。
#### API
### API
- [C 接口](include/AsstCaller.h)[集成示例](src/Cpp/main.cpp)
- [Python 接口](src/Python/asst/asst.py)[集成示例](src/Python/sample.py)
@@ -136,15 +131,11 @@ MAA 以中文(简体)为第一语言,翻译词条均以中文(简体)
- [任务流程协议](https://docs.maa.plus/zh-cn/protocol/task-schema.html)
- [自动抄作业协议](https://docs.maa.plus/zh-cn/protocol/copilot-schema.html)
#### 外服适配
### 外服适配
请参阅 [外服适配教程](https://docs.maa.plus/zh-cn/develop/overseas-client-adaptation.html),对于国服已支持的功能,绝大部分的外服适配工作仅需要截图 + 简单的 JSON 修改即可。
#### 想参与开发,但不太会用 GitHub?
[GitHub Pull Request 流程简述](https://docs.maa.plus/zh-cn/develop/development.html#github-pull-request-流程简述)
#### Issue bot
### Issue bot
请参阅 [Issue Bot 使用方法](https://docs.maa.plus/zh-cn/develop/issue-bot-usage.html)

View File

@@ -2,11 +2,11 @@
## 受支持的版本 / Supported Versions
我们仅对 v4 和 v5 两个大版本的最新稳定版提供安全支持,如有安全问题,我们将会尽可能快地发布新的稳定版解决。
我们仅对 v6 的最新稳定版提供安全支持,如有安全问题,我们将会尽可能快地发布新的稳定版解决。
内测版、公测版仅供测试,我们不会对其提供安全支持。
We only provide security support for the latest Stable Release versions of v4 and v5. If there are security issues, we will release a new stable version as soon as possible to solve them.
We only provide security support for the latest Stable Release versions of v6. If there are security issues, we will release a new stable version as soon as possible to solve them.
The Nightly Release version and the Beta Release version are for testing only, and we will not provide security support for them.

View File

@@ -1,83 +1,2 @@
set(debug_comp_defs "_DEBUG;ASST_DEBUG")
add_compile_definitions("$<$<CONFIG:Debug>:${debug_comp_defs}>")
if(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path;@executable_path")
set(CMAKE_BUILD_RPATH "@loader_path;@executable_path")
elseif(UNIX)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
set(CMAKE_BUILD_RPATH "$ORIGIN")
endif()
if(MSVC)
add_compile_options("/utf-8")
add_compile_options("/MP")
add_compile_options("/W4;/WX;/Gy;/permissive-;/sdl")
add_compile_options("/wd4127") # conditional expression is constant
add_compile_options("/wd4251") # export dll with templates
add_compile_options("/DWINVER=0x0A00")
add_compile_options("/D_WIN32_WINNT=0x0A00")
# https://github.com/actions/runner-images/issues/10004 https://github.com/microsoft/STL/releases/tag/vs-2022-17.10
add_compile_definitions("_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
set(release_link_options "/OPT:REF;/OPT:ICF")
add_link_options("$<$<CONFIG:Release>:${release_link_options}>")
SET(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO "RelWithDebInfo;Release;")
SET(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL "MinSizeRel;Release;")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else()
add_compile_options("-Wall;-Werror;-Wextra;-Wpedantic;-Wno-missing-field-initializers")
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
add_compile_options("-Wno-restrict")
endif()
endif()
if(LINUX)
function(copy_and_add_rpath_library LIBNAME)
execute_process(
COMMAND ${CMAKE_CXX_COMPILER} -print-file-name=${LIBNAME}.so.1 -target ${CMAKE_CXX_COMPILER_TARGET} --sysroot=${CMAKE_SYSROOT}
OUTPUT_VARIABLE LIB_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if("${LIB_PATH}" STREQUAL "${LIBNAME}.so.1")
message(FATAL_ERROR "Could not locate ${LIBNAME}.so.1 using compiler")
endif()
file(READ_SYMLINK "${LIB_PATH}" LINK_TARGET)
if(NOT LINK_TARGET)
set(LIB_PATH_REAL "${LIB_PATH}")
elseif(NOT IS_ABSOLUTE "${LINK_TARGET}")
get_filename_component(LIB_PATH_DIR "${LIB_PATH}" DIRECTORY)
file(REAL_PATH "${LIB_PATH_DIR}/${LINK_TARGET}" LIB_PATH_REAL)
else()
set(LIB_PATH_REAL "${LINK_TARGET}")
endif()
if(NOT EXISTS "${LIB_PATH_REAL}")
message(FATAL_ERROR "File not found: ${LIB_PATH_REAL}")
endif()
message(STATUS "${LIBNAME}.so.1 path: ${LIB_PATH_REAL}")
install(FILES "${LIB_PATH_REAL}" DESTINATION . RENAME "${LIBNAME}.so.1" COMPONENT libcxx)
get_filename_component(LIB_PATH_DIR "${LIB_PATH_REAL}" DIRECTORY)
list(APPEND CMAKE_BUILD_RPATH "${LIB_PATH_DIR}")
set(CMAKE_BUILD_RPATH "${CMAKE_BUILD_RPATH}" PARENT_SCOPE)
endfunction()
copy_and_add_rpath_library(libc++)
copy_and_add_rpath_library(libc++abi)
copy_and_add_rpath_library(libunwind)
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

View File

@@ -1,27 +1,81 @@
if (BUILD_XCFRAMEWORK)
add_custom_command(OUTPUT MaaCore.xcframework
COMMAND rm -rf MaaCore.xcframework
COMMAND xcodebuild -create-xcframework -library libMaaCore.dylib -headers ${PROJECT_SOURCE_DIR}/include -output MaaCore.xcframework
set(XCFRAMEWORK_DIR "${CMAKE_BINARY_DIR}/xcframework")
file(MAKE_DIRECTORY ${XCFRAMEWORK_DIR})
# Macro to find a unique library file
macro(find_unique_library lib_name glob_pattern output_var)
file(GLOB _libs CONFIGURE_DEPENDS "${MAADEPS_DIR}/runtime/${MAADEPS_TRIPLET}/${glob_pattern}")
if(_libs)
list(LENGTH _libs _cnt)
if(_cnt EQUAL 1)
list(GET _libs 0 ${output_var})
message(STATUS "Found ${lib_name}: ${${output_var}}")
else()
message(FATAL_ERROR "Ambiguous ${lib_name} dylibs: ${_libs}")
endif()
else()
message(FATAL_ERROR "${lib_name} library not found in ${MAADEPS_DIR}/runtime/${MAADEPS_TRIPLET}/")
endif()
endmacro()
add_custom_command(OUTPUT ${XCFRAMEWORK_DIR}/MaaCore.xcframework
COMMAND ${CMAKE_COMMAND} -E rm -rf "${XCFRAMEWORK_DIR}/MaaCore.xcframework"
COMMAND xcodebuild -create-xcframework
-library $<TARGET_FILE:MaaCore>
-headers ${PROJECT_SOURCE_DIR}/include
-output MaaCore.xcframework
DEPENDS MaaCore
WORKING_DIRECTORY ${XCFRAMEWORK_DIR}
COMMENT "Generating MaaCore.xcframework"
)
add_custom_command(OUTPUT ${XCFRAMEWORK_DIR}/MaaUtils.xcframework
COMMAND ${CMAKE_COMMAND} -E rm -rf "${XCFRAMEWORK_DIR}/MaaUtils.xcframework"
COMMAND xcodebuild -create-xcframework
-library $<TARGET_FILE:MaaUtils>
-output MaaUtils.xcframework
DEPENDS MaaUtils
WORKING_DIRECTORY ${XCFRAMEWORK_DIR}
COMMENT "Generating MaaUtils.xcframework"
)
add_custom_command(OUTPUT OpenCV.xcframework
COMMAND rm -rf OpenCV.xcframework
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libopencv_world4.408.dylib" -output OpenCV.xcframework
find_unique_library("OpenCV" "libopencv_world*.dylib" OPENCV_LIB)
add_custom_command(OUTPUT ${XCFRAMEWORK_DIR}/OpenCV.xcframework
COMMAND ${CMAKE_COMMAND} -E rm -rf "${XCFRAMEWORK_DIR}/OpenCV.xcframework"
COMMAND xcodebuild -create-xcframework
-library "${OPENCV_LIB}"
-output OpenCV.xcframework
WORKING_DIRECTORY ${XCFRAMEWORK_DIR}
COMMENT "Generating OpenCV.xcframework"
)
add_custom_command(OUTPUT ONNXRuntime.xcframework
COMMAND rm -rf ONNXRuntime.xcframework
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libonnxruntime.1.18.0.dylib" -output ONNXRuntime.xcframework
find_unique_library("ONNXRuntime" "libonnxruntime*.dylib" ONNXRUNTIME_LIB)
add_custom_command(OUTPUT ${XCFRAMEWORK_DIR}/ONNXRuntime.xcframework
COMMAND ${CMAKE_COMMAND} -E rm -rf "${XCFRAMEWORK_DIR}/ONNXRuntime.xcframework"
COMMAND xcodebuild -create-xcframework
-library "${ONNXRUNTIME_LIB}"
-output ONNXRuntime.xcframework
WORKING_DIRECTORY ${XCFRAMEWORK_DIR}
COMMENT "Generating ONNXRuntime.xcframework"
)
add_custom_command(OUTPUT fastdeploy_ppocr.xcframework
COMMAND rm -rf fastdeploy_ppocr.xcframework
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libfastdeploy_ppocr.dylib" -output fastdeploy_ppocr.xcframework
add_custom_command(OUTPUT ${XCFRAMEWORK_DIR}/fastdeploy_ppocr.xcframework
COMMAND ${CMAKE_COMMAND} -E rm -rf "${XCFRAMEWORK_DIR}/fastdeploy_ppocr.xcframework"
COMMAND xcodebuild -create-xcframework
-library "${MAADEPS_DIR}/runtime/${MAADEPS_TRIPLET}/libfastdeploy_ppocr.dylib"
-output fastdeploy_ppocr.xcframework
WORKING_DIRECTORY ${XCFRAMEWORK_DIR}
COMMENT "Generating fastdeploy_ppocr.xcframework"
)
add_custom_target(MaaXCFramework ALL
DEPENDS MaaCore MaaCore.xcframework OpenCV.xcframework ONNXRuntime.xcframework fastdeploy_ppocr.xcframework
DEPENDS
MaaCore
${XCFRAMEWORK_DIR}/MaaCore.xcframework
MaaUtils
${XCFRAMEWORK_DIR}/MaaUtils.xcframework
${XCFRAMEWORK_DIR}/OpenCV.xcframework
${XCFRAMEWORK_DIR}/ONNXRuntime.xcframework
${XCFRAMEWORK_DIR}/fastdeploy_ppocr.xcframework
)
endif (BUILD_XCFRAMEWORK)

View File

@@ -1,41 +0,0 @@
find_path(ONNXRuntime_INCLUDE_DIR NAMES onnxruntime/onnxruntime_c_api.h)
find_library(ONNXRuntime_LIBRARY_IMP NAMES onnxruntime)
if (WIN32)
get_filename_component(ONNXRuntime_PATH_LIB ${ONNXRuntime_LIBRARY_IMP} DIRECTORY)
find_file(ONNXRuntime_LIBRARY NAMES onnxruntime_maa.dll PATHS "${ONNXRuntime_PATH_LIB}/../bin")
find_file(ONNXRuntime_LIBRARY_IMP_DEBUG NAMES onnxruntime.lib PATHS "${ONNXRuntime_PATH_LIB}/../debug/lib")
find_file(ONNXRuntime_LIBRARY_DEBUG NAMES onnxruntime_maa.dll PATHS "${ONNXRuntime_PATH_LIB}/../debug/bin")
else ()
set(ONNXRuntime_LIBRARY ${ONNXRuntime_LIBRARY_IMP})
endif (WIN32)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
ONNXRuntime
REQUIRED_VARS ONNXRuntime_LIBRARY_IMP ONNXRuntime_INCLUDE_DIR
)
if(ONNXRuntime_FOUND)
set(ONNXRuntime_INCLUDE_DIRS ${ONNXRuntime_INCLUDE_DIR})
if(NOT TARGET ONNXRuntime::ONNXRuntime)
add_library(ONNXRuntime::ONNXRuntime SHARED IMPORTED)
set_property(TARGET ONNXRuntime::ONNXRuntime APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
if (WIN32)
set_property(TARGET ONNXRuntime::ONNXRuntime APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(ONNXRuntime::ONNXRuntime PROPERTIES
IMPORTED_IMPLIB_RELEASE "${ONNXRuntime_LIBRARY_IMP}"
)
set_target_properties(ONNXRuntime::ONNXRuntime PROPERTIES
IMPORTED_IMPLIB_DEBUG "${ONNXRuntime_LIBRARY_IMP_DEBUG}"
IMPORTED_LOCATION_DEBUG "${ONNXRuntime_LIBRARY_DEBUG}"
)
endif (WIN32)
set_target_properties(ONNXRuntime::ONNXRuntime PROPERTIES
IMPORTED_LOCATION_RELEASE "${ONNXRuntime_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${ONNXRuntime_INCLUDE_DIR}"
)
endif()
endif()

View File

@@ -1,50 +1,3 @@
function(download_and_decompress url filename sha256_checksum decompress_dir)
if(EXISTS ${filename})
file(SHA256 ${filename} CHECKSUM_VARIABLE)
endif()
if(NOT EXISTS ${filename} OR NOT CHECKSUM_VARIABLE STREQUAL sha256_checksum)
message("Downloading file from ${url} to ${filename} ...")
file(
DOWNLOAD ${url} "${filename}.tmp"
SHOW_PROGRESS
EXPECTED_HASH SHA256=${sha256_checksum})
file(RENAME "${filename}.tmp" ${filename})
endif()
if(NOT EXISTS ${decompress_dir})
file(MAKE_DIRECTORY ${decompress_dir})
endif()
message("Decompress file ${filename} ...")
execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf ${filename} WORKING_DIRECTORY ${decompress_dir})
endfunction()
function(get_osx_architecture)
if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(CURRENT_OSX_ARCH
"arm64"
PARENT_SCOPE)
elseif(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(CURRENT_OSX_ARCH
"x86_64"
PARENT_SCOPE)
else()
set(CURRENT_OSX_ARCH
${CMAKE_HOST_SYSTEM_PROCESSOR}
PARENT_SCOPE)
endif()
endfunction()
if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.3) # for to_chars
get_osx_architecture()
endif(APPLE)
if(NOT DEFINED MAADEPS_TRIPLET)
detect_maadeps_triplet(MAADEPS_TRIPLET)
endif()
# 创建资源目录链接的函数
function(create_resource_link TARGET_NAME OUTPUT_DIR)
if(WIN32)
@@ -70,4 +23,4 @@ function(create_resource_link TARGET_NAME OUTPUT_DIR)
COMMENT "Creating symlink for resource directory for ${TARGET_NAME}"
)
endif()
endfunction()
endfunction()

View File

@@ -1,27 +0,0 @@
# define MAA_HASH_VERSION from git
set(MAA_HASH_VERSION
"DEBUG_VERSION"
CACHE STRING "maa version")
if(WITH_HASH_VERSION AND MAA_HASH_VERSION STREQUAL "DEBUG_VERSION")
find_package(Git)
if(GIT_FOUND)
execute_process(
COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE err
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(result EQUAL 0)
set(MAA_HASH_VERSION "${output}")
else()
message(WARNING "git rev-parse returning ${result}, output:\n${err}")
endif()
endif()
endif()
message(STATUS "MAA_HASH_VERSION=${MAA_HASH_VERSION}")
add_compile_definitions(MAA_VERSION="${MAA_HASH_VERSION}")

View File

@@ -1,2 +1 @@
**/pnpm-lock.yaml
**/*.md

View File

@@ -11,12 +11,6 @@ module.exports = {
arrowParens: 'always',
overrides: [
{
files: ['**/*.ts'],
options: {
semi: true,
},
},
{
files: ['**/*.*css'],
options: {
@@ -36,5 +30,11 @@ module.exports = {
tabWidth: 4,
},
},
{
files: ['**/*.md'],
options: {
embeddedLanguageFormatting: 'off',
},
},
],
}

View File

@@ -1,11 +1,21 @@
import { defineClientConfig } from 'vuepress/client';
import { defineClientConfig } from 'vuepress/client'
import ImageGrid from './components/ImageGrid.vue';
import { getAsciiArt } from './plugins/asciiArt'
import './styles/index.scss';
import AsciiArt from './components/AsciiArt.vue'
import ImageGrid from './components/ImageGrid.vue'
import Redirect from './components/Redirect.vue'
import './styles/index.scss'
export default defineClientConfig({
enhance: ({ app }) => {
app.component('ImageGrid', ImageGrid);
app.component('AsciiArt', AsciiArt)
app.component('ImageGrid', ImageGrid)
app.component('Redirect', Redirect)
// 输出一个随机的字符画
const asciiArtData = getAsciiArt(undefined, 'auto', 'console')
console.log('%c' + asciiArtData.text, 'white-space: pre;')
},
});
})

View File

@@ -0,0 +1,106 @@
<template>
<div ref="asciiArtWrapperElement" class="ascii-art-wrapper">
<pre ref="asciiArtContentElement" class="ascii-art-content">{{ asciiArtText }}</pre>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount } from 'vue'
import { getAsciiArt, ThemeType, AsciiArtScope } from '../plugins/asciiArt'
// -------- Props --------
interface AsciiArtProps {
name?: string
theme?: ThemeType
scope?: AsciiArtScope
}
const props = defineProps<AsciiArtProps>()
// -------- Refs --------
const asciiArtWrapperElement = ref<HTMLElement>()
const asciiArtContentElement = ref<HTMLElement>()
// -------- Data --------
let asciiArtNameInUse = props.name
const asciiArtText = ref('')
let layoutObserver: ResizeObserver
let themeObserver: MutationObserver
let isScaleUpLocked = false
let lastScaleRatio = 1
function refreshAsciiArt() {
const asciiArtData = getAsciiArt(asciiArtNameInUse, props.theme, props.scope)
asciiArtNameInUse = asciiArtData.name
asciiArtText.value = asciiArtData.text
}
function scaleAsciiArt() {
if (!asciiArtWrapperElement.value || !asciiArtContentElement.value) return
// 原始高度和宽度无视scale
const contentWidth = asciiArtContentElement.value.scrollWidth
const contentHeight = asciiArtContentElement.value.scrollHeight
if (contentWidth === 0 || contentHeight === 0) return
const targetWidth = asciiArtWrapperElement.value.clientWidth
const targetHeight = window.innerHeight
const scaleRatio = Math.min(targetWidth / contentWidth, targetHeight / contentHeight)
// 锁定状态不允许放大
if (scaleRatio > lastScaleRatio && isScaleUpLocked) return
lastScaleRatio = scaleRatio
isScaleUpLocked = true
asciiArtContentElement.value.style.transform = `scale(${scaleRatio})`
asciiArtWrapperElement.value.style.height = `${contentHeight * scaleRatio}px`
}
function forceScaleAsciiArt() {
isScaleUpLocked = false
scaleAsciiArt()
}
onMounted(() => {
if (!asciiArtWrapperElement.value || !asciiArtContentElement.value) return
layoutObserver = new ResizeObserver(scaleAsciiArt)
layoutObserver.observe(asciiArtContentElement.value)
layoutObserver.observe(asciiArtWrapperElement.value)
themeObserver = new MutationObserver(refreshAsciiArt)
themeObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme'] })
window.addEventListener('resize', forceScaleAsciiArt)
refreshAsciiArt()
})
onBeforeUnmount(() => {
if (layoutObserver) {
layoutObserver.disconnect()
}
if (themeObserver) {
themeObserver.disconnect()
}
window.removeEventListener('resize', forceScaleAsciiArt)
})
</script>
<style scoped>
.ascii-art-wrapper {
display: flex;
justify-content: center;
align-items: flex-start;
}
.ascii-art-content {
display: block;
white-space: pre;
margin: 0 auto;
transform-origin: top;
line-height: 1;
font-family: 'JetBrains Mono', monospace;
}
</style>

View File

@@ -0,0 +1,25 @@
<template />
<script setup lang="ts">
import { onMounted } from 'vue'
import { useRouter, useRoute } from 'vuepress/client'
interface Props {
to?: string
}
const props = defineProps<Props>()
const route = useRoute()
const router = useRouter()
function resolvePath(to: string) {
const target = new URL(to, 'http://example.com' + route.path) // 使用一个虚拟的基础 URL
return target.pathname
}
onMounted(() => {
if (!props.to) return
const targetPath = resolvePath(props.to)
router.replace(targetPath)
})
</script>

View File

@@ -1,11 +1,13 @@
import { viteBundler } from '@vuepress/bundler-vite';
import { defineUserConfig } from 'vuepress';
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics';
import { plumeTheme } from 'vuepress-theme-plume';
import { viteBundler } from '@vuepress/bundler-vite'
import { defineUserConfig } from 'vuepress'
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
import { plumeTheme } from 'vuepress-theme-plume'
import DocSearchConfig from './plugins/search';
import { genSiteLocales } from './navigation/genLocales'
const isProd = process.env.NODE_ENV === 'production';
import DocSearchConfig from './plugins/search'
const isProd = process.env.NODE_ENV === 'production'
export default defineUserConfig({
base: '/',
@@ -15,33 +17,7 @@ export default defineUserConfig({
host: '0.0.0.0',
port: 3001,
locales: {
'/zh-cn/': {
lang: 'zh-CN',
title: 'MAA 文档站',
description: '文档',
},
'/zh-tw/': {
lang: 'zh-TW',
title: 'MAA 文件站',
description: '文件',
},
'/en-us/': {
lang: 'en-US',
title: 'MAA Documentation Site',
description: 'Documentation',
},
'/ja-jp/': {
lang: 'ja-JP',
title: 'MAA ドキュメントサイト',
description: 'ドキュメント',
},
'/ko-kr/': {
lang: 'ko-KR',
title: 'MAA 문서 사이트',
description: '문서',
},
},
locales: genSiteLocales(),
head: [
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
@@ -88,17 +64,16 @@ export default defineUserConfig({
contributors: false,
changelog: false,
blog: false,
cache: 'filesystem',
search: DocSearchConfig,
codeHighlighter: {
themes: { light: 'one-light', dark: 'one-dark-pro' },
themes: { light: 'snazzy-light', dark: 'night-owl' },
},
markdown: {
annotation: true,
image: {
lazyload: true,
mark: true,
@@ -132,4 +107,4 @@ export default defineUserConfig({
id: 'G-FJQDKG394Z',
}),
],
});
})

View File

@@ -1,5 +0,0 @@
declare module '*.vue' {
import { DefineComponent } from 'vue';
const component: DefineComponent<{}, {}, any>;
export default component;
}

View File

@@ -1,19 +0,0 @@
import { defineNavbarConfig } from 'vuepress-theme-plume';
export const enusNavbar = defineNavbarConfig([
{
text: 'User Manual',
icon: 'mdi:user',
link: '/en-us/manual/newbie.html',
},
{
text: 'Development Docs',
icon: 'ph:code-bold',
link: '/en-us/develop/development.html',
},
{
text: 'Protocol Docs',
icon: 'basil:document-solid',
link: '/en-us/protocol/integration.html',
},
]);

View File

@@ -1,5 +0,0 @@
export * from './zh-cn';
export * from './zh-tw';
export * from './en-us';
export * from './ja-jp';
export * from './ko-kr';

View File

@@ -1,19 +0,0 @@
import { defineNavbarConfig } from 'vuepress-theme-plume';
export const jajpNavbar = defineNavbarConfig([
{
text: '使用説明',
icon: 'mdi:user',
link: '/ja-jp/manual/newbie.html',
},
{
text: '開発関連',
icon: 'ph:code-bold',
link: '/ja-jp/develop/development.html',
},
{
text: 'プロトコルドキュメント',
icon: 'basil:document-solid',
link: '/ja-jp/protocol/integration.html',
},
]);

View File

@@ -1,19 +0,0 @@
import { defineNavbarConfig } from 'vuepress-theme-plume';
export const kokrNavbar = defineNavbarConfig([
{
text: '사용자 설명서',
icon: 'mdi:user',
link: '/ko-kr/manual/newbie.html',
},
{
text: '개발 문서',
icon: 'ph:code-bold',
link: '/ko-kr/develop/development.html',
},
{
text: '프로토콜 문서',
icon: 'basil:document-solid',
link: '/ko-kr/protocol/integration.html',
},
]);

View File

@@ -1,19 +0,0 @@
import { defineNavbarConfig } from 'vuepress-theme-plume';
export const zhcnNavbar = defineNavbarConfig([
{
text: '用户手册',
icon: 'mdi:user',
link: '/zh-cn/manual/newbie.html',
},
{
text: '开发文档',
icon: 'ph:code-bold',
link: '/zh-cn/develop/development.html',
},
{
text: '协议文档',
icon: 'basil:document-solid',
link: '/zh-cn/protocol/integration.html',
},
]);

View File

@@ -1,19 +0,0 @@
import { defineNavbarConfig } from 'vuepress-theme-plume';
export const zhtwNavbar = defineNavbarConfig([
{
text: '用戶說明書',
icon: 'mdi:user',
link: '/zh-tw/manual/newbie.html',
},
{
text: '開發文件',
icon: 'ph:code-bold',
link: '/zh-tw/develop/development.html',
},
{
text: '協議文件',
icon: 'basil:document-solid',
link: '/zh-tw/protocol/integration.html',
},
]);

View File

@@ -0,0 +1,29 @@
import { SiteLocaleConfig, LocaleConfig } from 'vuepress'
import { ThemeLocaleData } from 'vuepress-theme-plume'
import { locales } from './i18n'
import { genNavigationComponents } from './genNavigationComponents'
export function genSiteLocales(): SiteLocaleConfig {
const siteLocales: SiteLocaleConfig = {}
for (const locale of locales) {
siteLocales[`/${locale.name}/`] = {
lang: locale.htmlLang,
title: locale.siteTitle,
description: locale.siteDescription,
}
}
return siteLocales
}
export function genThemeLocales(): LocaleConfig<ThemeLocaleData> {
const themeLocales: LocaleConfig<ThemeLocaleData> = {}
for (const locale of locales) {
const navigationComponents = genNavigationComponents(locale)
themeLocales[`/${locale.name}/`] = {
navbar: navigationComponents.navbar,
collections: navigationComponents.collections,
}
}
return themeLocales
}

View File

@@ -0,0 +1,161 @@
import * as fs from 'fs'
import * as path from 'path'
import { default as matter } from 'gray-matter'
import { ThemeCollectionItem, ThemeNavItem, ThemeSidebarItem } from 'vuepress-theme-plume'
import { Locale } from './i18n'
interface MetaData {
baseName: string
order: number
title: string
icon: string
index: boolean
}
interface NavigationComponents {
navbar: ThemeNavItem[]
collections: ThemeCollectionItem[]
}
type SidebarItem = ThemeSidebarItem | string
function getMetaData(dir: string, entry: fs.Dirent): MetaData | null {
const currentPath = path.join(dir, entry.name)
if (!fs.existsSync(currentPath)) {
return null
}
let mdFilePath = ''
if (entry.isDirectory()) {
mdFilePath = path.join(currentPath, 'README.md')
} else if (entry.isFile() && entry.name.endsWith('.md') && entry.name.toLowerCase() !== 'readme.md') {
mdFilePath = currentPath
} else {
return null
}
if (!fs.existsSync(mdFilePath)) {
return null
}
const fileContent = fs.readFileSync(mdFilePath, 'utf-8')
const meta = matter(fileContent).data ?? {}
// 文件名,不含扩展名
const baseName = path.parse(entry.name).name
// 获取顺序目录的order在meta.dir.order里文件的order在meta.order里默认值为一个大数
const order = Number((entry.isDirectory() ? meta?.dir?.order : meta?.order) ?? Number.MAX_SAFE_INTEGER)
// 获取标题先从matter里找title再用正则获取一级标题最后fallback到文件名不含扩展名
const title = String(meta?.title ?? RegExp('# (.+)').exec(fileContent)?.[1] ?? baseName)
// 获取图标
const icon = String(meta?.icon ?? '')
// 是否添加到索引文件永远为true目录则看meta.index默认true
const index = entry.isDirectory() ? (Boolean(meta?.index) ?? true) : true
return {
baseName: baseName,
order: order,
title: title,
icon: icon,
index: index,
}
}
function getSidebarItems(dir: string): SidebarItem[] {
interface WrappedSidebarItem {
sidebarItem: SidebarItem
order: number
}
const entries = fs.readdirSync(dir, { withFileTypes: true }).filter((e) => !e.name.startsWith('.'))
const sidebarItemsWithOrder: WrappedSidebarItem[] = []
for (const entry of entries) {
let sidebarItem: SidebarItem
const metaData = getMetaData(dir, entry)
if (!metaData) {
continue
}
if (entry.isDirectory()) {
const children = getSidebarItems(path.join(dir, entry.name))
// 可折叠的子目录
sidebarItem = {
text: metaData.title,
// 只有当目录设置了index: true时才生成链接否则点击时不跳转、只切换折叠状态
link: metaData.index ? `${metaData.baseName}/` : undefined,
icon: metaData.icon,
// 目前没有文档使用了badge这个特性故不处理
// badge: undefined,
collapsed: true,
// 前面不能加斜杠,必须用相对路径
prefix: `${metaData.baseName}/`,
items: children,
}
} else if (entry.isFile() && entry.name.endsWith('.md') && entry.name.toLowerCase() !== 'readme.md') {
// 普通文件,取完整文件名作为链接
sidebarItem = entry.name
}
sidebarItemsWithOrder.push({ sidebarItem: sidebarItem, order: metaData.order })
}
sidebarItemsWithOrder.sort((a, b) => a.order - b.order)
return sidebarItemsWithOrder.map((i) => i.sidebarItem)
}
export function genNavigationComponents(
locale: Locale,
baseDir = path.resolve(__dirname, '../../'),
): NavigationComponents {
interface WrappedNavigationComponent {
navItem: ThemeNavItem
collectionItem: ThemeCollectionItem
order: number
}
const navigationComponentsWithOrder: WrappedNavigationComponent[] = []
// 进入指定语言目录即docs/<i18n>/
const langDir = path.join(baseDir, locale.name)
// 获取所有非隐藏文件和目录
const entries = fs.readdirSync(langDir, { withFileTypes: true }).filter((e) => !e.name.startsWith('.'))
for (const entry of entries) {
if (!entry.isDirectory()) continue
const metaData = getMetaData(langDir, entry)
if (!metaData) {
continue
}
const navbarItem: ThemeNavItem = {
text: metaData.title,
icon: metaData.icon,
link: `/${locale.name}/${metaData.baseName}/`,
}
const collectionItem: ThemeCollectionItem = {
type: 'doc',
title: metaData.title,
dir: metaData.baseName,
linkPrefix: `/${metaData.baseName}/`,
sidebar: getSidebarItems(path.join(langDir, entry.name)),
}
navigationComponentsWithOrder.push({
navItem: navbarItem,
collectionItem: collectionItem,
order: metaData.order,
})
}
navigationComponentsWithOrder.sort((a, b) => a.order - b.order)
return {
navbar: navigationComponentsWithOrder.map((i) => i.navItem),
collections: navigationComponentsWithOrder.map((i) => i.collectionItem),
}
}

View File

@@ -0,0 +1,45 @@
export interface Locale {
name: string
// displayName: string
htmlLang: string
siteTitle: string
siteDescription: string
}
export const locales: Locale[] = [
{
name: 'zh-cn',
// displayName: '简体中文',
htmlLang: 'zh-CN',
siteTitle: 'MAA 文档站',
siteDescription: '文档',
},
{
name: 'zh-tw',
// displayName: '繁體中文',
htmlLang: 'zh-TW',
siteTitle: 'MAA 文件站',
siteDescription: '文件',
},
{
name: 'en-us',
// displayName: 'English',
htmlLang: 'en-US',
siteTitle: 'MAA Documentation Site',
siteDescription: 'Documentation',
},
{
name: 'ja-jp',
// displayName: '日本語',
htmlLang: 'ja-JP',
siteTitle: 'MAA ドキュメントサイト',
siteDescription: 'ドキュメント',
},
{
name: 'ko-kr',
// displayName: '한국어',
htmlLang: 'ko-KR',
siteTitle: 'MAA 문서 사이트',
siteDescription: '문서',
},
]

View File

@@ -1,8 +0,0 @@
import { defineNotesConfig } from 'vuepress-theme-plume';
import { genNotes } from './genSidebar';
export const enusNotes = defineNotesConfig({
dir: 'en-us',
link: '/en-us/',
notes: genNotes('en-us'),
});

View File

@@ -1,119 +0,0 @@
import * as fs from 'fs';
import * as path from 'path';
import * as matterModule from 'gray-matter';
import { defineNoteConfig, ThemeNote, ThemeSidebarItem } from 'vuepress-theme-plume';
const matter = (matterModule as any).default;
interface MetaData {
baseName: string;
order: number;
title: string;
icon: string;
index: boolean;
}
function getMetaData(dir: string, entry: fs.Dirent): MetaData | null {
const currentPath = path.join(dir, entry.name);
if (!fs.existsSync(currentPath)) {
return null;
}
let mdFilePath = '';
if (entry.isDirectory()) {
mdFilePath = path.join(currentPath, 'README.md');
} else if (entry.isFile() && entry.name.endsWith('.md') && entry.name.toLowerCase() !== 'readme.md') {
mdFilePath = currentPath;
} else {
return null;
}
if (!fs.existsSync(mdFilePath)) {
return null;
}
const fileContent = fs.readFileSync(mdFilePath, 'utf-8');
const meta = matter(fileContent).data ?? {};
const baseName = path.parse(entry.name).name;
// 获取顺序目录的order在meta.dir.order里文件的order在meta.order里默认值为一个大数
const order = Number((entry.isDirectory() ? meta?.dir?.order : meta?.order) ?? Number.MAX_SAFE_INTEGER);
// 获取标题先从matter里找title再用正则获取一级标题最后fallback到文件名不含扩展名
const title = String(meta?.title ?? RegExp('# (.+)').exec(fileContent)?.[1] ?? baseName);
// 获取图标
const icon = String(meta?.icon ?? '');
// 是否作为索引页文件永远为true目录则看meta.index默认true
const index = entry.isDirectory() ? (Boolean(meta?.index) ?? true) : true;
return {
baseName: baseName,
order: order,
title: title,
icon: icon,
index: index,
};
}
export function genNotes(lang: string, baseDir = path.resolve(__dirname, '../../')): ThemeNote[] {
// 进入指定语言目录即docs/<i18n>/
const langDir = path.join(baseDir, lang);
// 递归获取目录和文件
function getItems(dir: string, isRoot: boolean): any[] {
// 将内容与对应顺序进行包装
interface Wrapped {
content: ThemeNote | ThemeSidebarItem | string;
order: number;
}
let itemsWithOrder: Wrapped[] = [];
// 获取所有非隐藏文件和目录
const entries = fs.readdirSync(dir, { withFileTypes: true }).filter((e) => !e.name.startsWith('.'));
for (const entry of entries) {
const metaData = getMetaData(dir, entry);
if (!metaData) {
continue;
}
if (entry.isDirectory()) {
// 递归获取子目录内容
const children = getItems(path.join(dir, entry.name), false);
if (isRoot) {
// 一级目录,作为“专题”
const item = defineNoteConfig({
dir: metaData.baseName,
link: `/${metaData.baseName}/`,
text: metaData.title,
sidebar: children,
});
itemsWithOrder.push({ content: item, order: metaData.order });
} else {
// 非一级目录,作为可折叠的子目录
const item: ThemeSidebarItem = {
text: metaData.title,
// 只有当目录设置了index: true时才生成链接否则点击时不跳转、只切换折叠状态
link: metaData.index ? `${metaData.baseName}/` : undefined,
icon: metaData.icon,
// 目前没有文档使用了这个特性,故不处理
// badge: undefined,
collapsed: true,
// 前面不能加斜杠,必须用相对路径
prefix: `${metaData.baseName}/`,
items: children,
};
itemsWithOrder.push({ content: item, order: metaData.order });
}
} else if (entry.isFile() && entry.name.endsWith('.md') && entry.name.toLowerCase() !== 'readme.md') {
// 普通文件,取完整文件名作为链接
const item = entry.name;
itemsWithOrder.push({ content: item, order: metaData.order });
}
}
// 当前dir的内容读取完毕进行排序并返回返回时丢弃order
itemsWithOrder.sort((a, b) => a.order - b.order);
return itemsWithOrder.map((i) => i.content);
}
// 递归起点只有这里是一级目录isRoot传true
return getItems(langDir, true);
}

View File

@@ -1,5 +0,0 @@
export * from './zh-cn';
export * from './zh-tw';
export * from './en-us';
export * from './ja-jp';
export * from './ko-kr';

View File

@@ -1,8 +0,0 @@
import { defineNotesConfig } from 'vuepress-theme-plume';
import { genNotes } from './genSidebar';
export const jajpNotes = defineNotesConfig({
dir: 'ja-jp',
link: '/ja-jp/',
notes: genNotes('ja-jp'),
});

View File

@@ -1,8 +0,0 @@
import { defineNotesConfig } from 'vuepress-theme-plume';
import { genNotes } from './genSidebar';
export const kokrNotes = defineNotesConfig({
dir: 'ko-kr',
link: '/ko-kr/',
notes: genNotes('ko-kr'),
});

View File

@@ -1,8 +0,0 @@
import { defineNotesConfig } from 'vuepress-theme-plume';
import { genNotes } from './genSidebar';
export const zhcnNotes = defineNotesConfig({
dir: 'zh-cn',
link: '/zh-cn/',
notes: genNotes('zh-cn'),
});

View File

@@ -1,8 +0,0 @@
import { defineNotesConfig } from 'vuepress-theme-plume';
import { genNotes } from './genSidebar';
export const zhtwNotes = defineNotesConfig({
dir: 'zh-tw',
link: '/zh-tw/',
notes: genNotes('zh-tw'),
});

View File

@@ -0,0 +1,90 @@
const modules = import.meta.glob<string>('../../asciiArts/*.txt', { query: '?raw', import: 'default', eager: true })
const asciiArts: Record<string, string> = {}
for (const path in modules) {
const name = path
.split('/')
.pop()
?.replace(/\.txt$/, '')!
asciiArts[name] = modules[path]
}
export type ThemeType = 'auto' | 'disable' | string
export type AsciiArtScope = 'web' | 'console'
interface AsciiArtData {
name: string | null
text: string
}
function pickAsciiArt(
arts: Record<string, string>,
artFilter?: (key: string) => boolean,
keyToName?: (key: string) => string,
): AsciiArtData {
const keys = artFilter ? Object.keys(arts).filter(artFilter) : Object.keys(arts)
let asciiArtKey: string | null
let asciiArtText: string
if (keys.length === 0) {
asciiArtKey = null
asciiArtText = ''
} else if (keys.length === 1) {
asciiArtKey = keys[0]
asciiArtText = arts[keys[0]]
} else {
const randomKey = keys[Math.floor(Math.random() * keys.length)]
asciiArtKey = randomKey
asciiArtText = arts[randomKey]
}
if (!asciiArtKey || !keyToName) {
return { name: asciiArtKey, text: asciiArtText }
} else {
return { name: keyToName(asciiArtKey), text: asciiArtText }
}
}
export function getAsciiArt(name?: string, theme: ThemeType = 'auto', scope: AsciiArtScope = 'web'): AsciiArtData {
let resolvedTheme: ThemeType = theme
// auto 模式
if (theme === 'auto') {
let currentTheme: string | null = null
if (scope === 'web' && typeof document !== 'undefined') {
// 浏览器中读取 HTML data-theme
currentTheme = document?.documentElement?.getAttribute('data-theme')
} else if (scope === 'console' && typeof window !== 'undefined' && window.matchMedia) {
// fallback: 检查系统首选主题
currentTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
}
resolvedTheme = currentTheme ? currentTheme : 'disable'
}
if (resolvedTheme !== 'disable') {
// light/dark/... 模式
return name
? pickAsciiArt(
asciiArts,
(k) => k === name + '.' + resolvedTheme,
() => name,
)
: pickAsciiArt(
asciiArts,
(k) => k.endsWith('.' + resolvedTheme),
(k) => k.replace(new RegExp('\\.' + resolvedTheme + '$'), ''),
)
} else {
// disable 模式
return name
? pickAsciiArt(
asciiArts,
(k) => k === name || k.startsWith(name + '.'),
() => name,
)
: pickAsciiArt(
asciiArts,
() => true,
(k) => k,
)
}
}

View File

@@ -1,8 +1,8 @@
export default {
provider: 'algolia' as const,
appId: '99JM20SIFG',
apiKey: '7596a5a8c95cd64d4cf3050c9a4f878e',
indexName: 'maa',
appId: '9ARM1N4899',
apiKey: 'f42bf1d18c786d5a46da30eccac5cb34',
indexName: 'MaaAssistantArknights',
locales: {
'/zh-cn/': {
placeholder: '搜索',
@@ -81,4 +81,4 @@ export default {
},
},
},
};
}

View File

@@ -1,6 +1,5 @@
import { defineThemeConfig } from 'vuepress-theme-plume';
import { zhcnNavbar, zhtwNavbar, enusNavbar, jajpNavbar, kokrNavbar } from './navbar';
import { zhcnNotes, zhtwNotes, enusNotes, jajpNotes, kokrNotes } from './notes';
import { defineThemeConfig } from 'vuepress-theme-plume'
import { genThemeLocales } from './navigation/genLocales'
export default defineThemeConfig({
logo: '/images/maa-logo_512x512.png',
@@ -25,28 +24,7 @@ export default defineThemeConfig({
footer: false,
locales: {
'/zh-cn/': {
navbar: zhcnNavbar,
notes: zhcnNotes,
},
'/zh-tw/': {
navbar: zhtwNavbar,
notes: zhtwNotes,
},
'/en-us/': {
navbar: enusNavbar,
notes: enusNotes,
},
'/ja-jp/': {
navbar: jajpNavbar,
notes: jajpNotes,
},
'/ko-kr/': {
navbar: kokrNavbar,
notes: kokrNotes,
},
},
locales: genThemeLocales(),
autoFrontmatter: false,
@@ -126,4 +104,4 @@ export default defineThemeConfig({
// },
// ],
//},
});
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 KiB

After

Width:  |  Height:  |  Size: 690 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Some files were not shown because too many files have changed in this diff Show More