Repository navigation
refactor(config): 移除模板初始化并统一配置懒加载 - #155
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原神适配器首次构造和脚本路径变化时,原先会用模板将 CompletionAction 强制覆盖为「关闭游戏和软件」。移除这套模板初始化,在 task_switch_list.yml 声明「完成后操作」,复用现有 TaskOptions 的反读、保存机制,用户修改后才写回。
两套 GUI 对只有一个同名字段的独立选项组直接显示一行控件,不增加分组标题或缩进。「完成后操作」显示为标签加下拉框。
配置适配器统一采用懒初始化:首次使用时构造,之后复用缓存。ScriptConfig 基类仅装配日常、周常,MAA 在自身构造期维护原生任务队列。删除显式 init_config / init_config_all、ensure_config 和 Qt 配置预热;新增或修改脚本路径、标识时仅清除适配器缓存,下次使用时重新构造,不额外执行初始化。输入控件预热仍在首帧后执行。
删除旧 BGI 模板及已无消费者的脚本级 template 元数据,保留日常模板机制。补充反读与显式保存、缓存失效不写盘、首次使用只初始化一次及单行显示的回归测试,并更新测试夹具和 Google 风格函数文档。
验证: