fix:normal
This commit is contained in:
@@ -441,7 +441,7 @@ class ActionManager:
|
||||
Dict[str, ActionInfo]: 在指定模式下可用的动作集合
|
||||
"""
|
||||
filtered_actions = {}
|
||||
|
||||
|
||||
print(self._using_actions)
|
||||
|
||||
for action_name, action_info in self._using_actions.items():
|
||||
|
||||
@@ -57,7 +57,7 @@ class NormalChatActionModifier:
|
||||
chat_context = chat_stream.context if hasattr(chat_stream, "context") else None
|
||||
if chat_context:
|
||||
# 获取Normal模式下的可用动作(已经过滤了mode_enable)
|
||||
current_using_actions = self.action_manager.get_using_actions_for_mode(ChatMode.NORMAL)
|
||||
current_using_actions = self.action_manager.get_using_actions_for_mode("normal")
|
||||
# print(f"current_using_actions: {current_using_actions}")
|
||||
for action_name in current_using_actions.keys():
|
||||
if action_name in self.all_actions:
|
||||
@@ -100,7 +100,7 @@ class NormalChatActionModifier:
|
||||
chat_content = ""
|
||||
|
||||
# 获取当前Normal模式下的动作集进行激活判定
|
||||
current_actions = self.action_manager.get_using_actions_for_mode(ChatMode.NORMAL)
|
||||
current_actions = self.action_manager.get_using_actions_for_mode("normal")
|
||||
|
||||
# print(f"current_actions: {current_actions}")
|
||||
# print(f"chat_content: {chat_content}")
|
||||
@@ -150,7 +150,7 @@ class NormalChatActionModifier:
|
||||
logger.info(f"{self.log_prefix} 动作调整完成: {' | '.join(reasons)}")
|
||||
|
||||
# 获取最终的Normal模式可用动作并记录
|
||||
final_actions = self.action_manager.get_using_actions_for_mode(ChatMode.NORMAL)
|
||||
final_actions = self.action_manager.get_using_actions_for_mode("normal")
|
||||
logger.debug(f"{self.log_prefix} 当前Normal模式可用动作: {list(final_actions.keys())}")
|
||||
|
||||
async def _apply_normal_activation_filtering(
|
||||
@@ -278,7 +278,7 @@ class NormalChatActionModifier:
|
||||
|
||||
def get_available_actions_count(self) -> int:
|
||||
"""获取当前可用动作数量(排除默认的no_action)"""
|
||||
current_actions = self.action_manager.get_using_actions_for_mode(ChatMode.NORMAL)
|
||||
current_actions = self.action_manager.get_using_actions_for_mode("normal")
|
||||
# 排除no_action(如果存在)
|
||||
filtered_actions = {k: v for k, v in current_actions.items() if k != "no_action"}
|
||||
return len(filtered_actions)
|
||||
|
||||
Reference in New Issue
Block a user