feat(chat): refactor logging and integrate no_reply system action

将日志前缀管理集中到context,新增willing_manager依赖,并把no_reply提升为系统级可用动作

- CycleProcessor 统一改从 context 获取 log_prefix
- HeartFChatting 引入 willing_manager
- ResponseHandler _send_response -> send_response 去下划线统一对外接口
- ActionPlanner 将 no_reply 添加至 current_available_actions
This commit is contained in:
Windpicker-owo
2025-09-01 22:41:42 +08:00
parent 2dbce6a738
commit 780cfbd7df
4 changed files with 25 additions and 11 deletions

View File

@@ -590,6 +590,20 @@ class ActionPlanner:
else:
logger.warning(f"{self.log_prefix}使用中的动作 {action_name} 未在已注册动作中找到")
# 将no_reply作为系统级特殊动作添加到可用动作中
# no_reply虽然是系统级决策但需要让规划器认为它是可用的
no_reply_info = ActionInfo(
name="no_reply",
component_type=ComponentType.ACTION,
description="系统级动作:选择不回复消息的决策",
action_parameters={},
activation_keywords=[],
plugin_name="SYSTEM",
enabled=True, # 始终启用
parallel_action=False,
)
current_available_actions["no_reply"] = no_reply_info
return is_group_chat, chat_target_info, current_available_actions