## 由 Sourcery 提供的总结
使配置保存使用基于异步和信号量的机制,并确保最终保存时采用一致的锁定方式。
错误修复:
- 通过统一使用基于信号量的 `Save` 实现,防止在保存配置文件时可能出现的竞态条件和不一致的锁定问题。
增强内容:
- 重构配置的 `Save` 方法,使其异步化并使用异步文件 I/O,在需要的地方将调用方更新为以同步方式调用该方法。
- 从配置工厂中移除未使用的 WPF 命名空间导入。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
通过切换为基于信号量的保护机制来统一配置保存时的加锁方式,并将其一致地应用于同步保存和发布时(release-time)的保存。
Bug Fixes:
- 通过使用与其他地方相同的信号量来保护同步保存操作,防止配置保存时的竞态条件。
Enhancements:
- 优化配置保存逻辑,在使用信号量时采用 try/catch/finally 结构,并将保存成功或失败的日志记录逻辑集中化。
- 从配置工厂中移除未使用的 WPF 命名空间引用。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Unify configuration save locking by switching to semaphore-based
protection and apply it consistently to synchronous and release-time
saves.
Bug Fixes:
- Prevent configuration save race conditions by guarding synchronous
saves with the same semaphore used elsewhere.
Enhancements:
- Refine configuration save logic to use try/catch/finally around
semaphore usage and centralize logging of save success or failure.
- Remove an unused WPF namespace import from the configuration factory.
</details>
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
通过切换为基于信号量的保护机制来统一配置保存时的加锁方式,并将其一致地应用于同步保存和发布时(release-time)的保存。
Bug Fixes:
- 通过使用与其他地方相同的信号量来保护同步保存操作,防止配置保存时的竞态条件。
Enhancements:
- 优化配置保存逻辑,在使用信号量时采用 try/catch/finally 结构,并将保存成功或失败的日志记录逻辑集中化。
- 从配置工厂中移除未使用的 WPF 命名空间引用。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Unify configuration save locking by switching to semaphore-based
protection and apply it consistently to synchronous and release-time
saves.
Bug Fixes:
- Prevent configuration save race conditions by guarding synchronous
saves with the same semaphore used elsewhere.
Enhancements:
- Refine configuration save logic to use try/catch/finally around
semaphore usage and centralize logging of save success or failure.
- Remove an unused WPF namespace import from the configuration factory.
</details>
</details>
</details>
- close#17032
@MaaAssistantArknights/i18n-dev
## Summary by Sourcery
为理智药剂使用添加详细的报告和 UI 处理,包括按药剂的使用信息,并重构处理该子任务消息的位置。
新特性:
- 在理智药剂使用的 `SubTaskExtraInfo` 消息中加入按药剂的使用详情,并在任务队列日志中展示这些信息。
增强:
- 将药剂使用子任务的处理从 `AsstProxy` 移动到
`FightSettingsUserControlModel`,并扩展以展示当前使用的药剂信息,同时保留成就追踪功能。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Add detailed reporting and UI handling for sanity medicine usage,
including per-medicine information, and refactor where this subtask
message is processed.
New Features:
- Include per-medicine usage details in SubTaskExtraInfo messages for
sanity medicine usage and surface them in the task queue logs.
Enhancements:
- Move medicine usage subtask handling from AsstProxy into
FightSettingsUserControlModel and extend it to show currently used
medicine information while preserving achievement tracking.
</details>