From b74376387a4d620befd6a89f10fb03212ebbf714 Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Sat, 12 Jul 2025 23:34:52 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9B=E7=8E=B0=E5=9C=A8=E5=8F=AA?= =?UTF-8?q?=E9=9C=80=E8=A6=81activation=5Ftype=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/hello_world_plugin/_manifest.json | 3 +-- src/chat/planner_actions/action_modifier.py | 5 +++-- src/chat/planner_actions/planner.py | 2 +- src/plugins/built_in/tts_plugin/_manifest.json | 3 +-- src/plugins/built_in/vtb_plugin/_manifest.json | 3 +-- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/hello_world_plugin/_manifest.json b/plugins/hello_world_plugin/_manifest.json index 86f01afc3..b1a4c4eb8 100644 --- a/plugins/hello_world_plugin/_manifest.json +++ b/plugins/hello_world_plugin/_manifest.json @@ -10,8 +10,7 @@ "license": "GPL-v3.0-or-later", "host_application": { - "min_version": "0.8.0", - "max_version": "0.8.0" + "min_version": "0.8.0" }, "homepage_url": "https://github.com/MaiM-with-u/maibot", "repository_url": "https://github.com/MaiM-with-u/maibot", diff --git a/src/chat/planner_actions/action_modifier.py b/src/chat/planner_actions/action_modifier.py index bd4964a20..3c68ab700 100644 --- a/src/chat/planner_actions/action_modifier.py +++ b/src/chat/planner_actions/action_modifier.py @@ -160,8 +160,9 @@ class ActionModifier: random.shuffle(actions_to_check) for action_name, action_info in actions_to_check: - activation_type = "focus_activation_type" - activation_type = action_info.get(activation_type, "always") + activation_type = action_info.get("activation_type", "") + if not activation_type: + activation_type = action_info.get("focus_activation_type", "") if activation_type == "always": continue # 总是激活,无需处理 diff --git a/src/chat/planner_actions/planner.py b/src/chat/planner_actions/planner.py index 47da0d3ba..8863c60fa 100644 --- a/src/chat/planner_actions/planner.py +++ b/src/chat/planner_actions/planner.py @@ -171,7 +171,7 @@ class ActionPlanner: if action == "no_action": reasoning = "normal决定不使用额外动作" - elif action not in current_available_actions: + elif action != "no_reply" and action != "reply" and action not in current_available_actions: logger.warning( f"{self.log_prefix}LLM 返回了当前不可用或无效的动作: '{action}' (可用: {list(current_available_actions.keys())}),将强制使用 'no_reply'" ) diff --git a/src/plugins/built_in/tts_plugin/_manifest.json b/src/plugins/built_in/tts_plugin/_manifest.json index be9f61b0a..05a233757 100644 --- a/src/plugins/built_in/tts_plugin/_manifest.json +++ b/src/plugins/built_in/tts_plugin/_manifest.json @@ -10,8 +10,7 @@ "license": "GPL-v3.0-or-later", "host_application": { - "min_version": "0.8.0", - "max_version": "0.8.10" + "min_version": "0.8.0" }, "homepage_url": "https://github.com/MaiM-with-u/maibot", "repository_url": "https://github.com/MaiM-with-u/maibot", diff --git a/src/plugins/built_in/vtb_plugin/_manifest.json b/src/plugins/built_in/vtb_plugin/_manifest.json index 1cff37136..96f985abd 100644 --- a/src/plugins/built_in/vtb_plugin/_manifest.json +++ b/src/plugins/built_in/vtb_plugin/_manifest.json @@ -9,8 +9,7 @@ }, "license": "GPL-v3.0-or-later", "host_application": { - "min_version": "0.8.0", - "max_version": "0.8.10" + "min_version": "0.8.0" }, "keywords": ["vtb", "vtuber", "emotion", "expression", "virtual", "streamer"], "categories": ["Entertainment", "Virtual Assistant", "Emotion"],