fix: 修复在解析until命令块时,category字段是冲突的。

This commit is contained in:
valencia_fly
2024-07-28 17:34:23 +08:00
committed by ValenciaFly
parent 3f4193009e
commit 40cbee9461

View File

@@ -361,11 +361,10 @@ bool asst::CopilotConfig::parse_action(const json::value& action_info, asst::bat
auto& until = action.payload.emplace<UntilInfo>();
// 必选字段
until.category = TriggerInfo::loadCategoryFrom(action_info.at("category").as_string());
until.category = TriggerInfo::loadCategoryFrom(action_info.at("mode").as_string());
switch (until.category) {
case TriggerInfo::Category::Any:
case TriggerInfo::Category::All:
case TriggerInfo::Category::Succ:
break;
default:
until.category = TriggerInfo::Category::All;