pull/1451/head
墨梓柒 2025-12-16 17:35:53 +08:00
commit eec503ae31
No known key found for this signature in database
GPG Key ID: 4A65B9DBA35F7635
4 changed files with 44 additions and 4 deletions

View File

@ -1,10 +1,20 @@
# Changelog
## [0.11.7] - 2025-12-2
## [0.12.0] - 2025-12-16
### 🌟 重大更新
- 添加思考力度机制,动态控制回复时间和长度
- planner和replyer现在开启联动更好的回复逻辑
- 新的私聊系统吸收了pfc的优秀机制
- 增加麦麦做梦功能
- mcp插件作为内置插件加入默认不启用
- 添加全局记忆配置项,现在可以选择让记忆为全局的
- 添加全局记忆配置项
### 细节功能更改
- 移除频率自动调整
- 移除情绪功能
- 优化记忆差许多呢超时设置
- 部分配置为0的bug
- 黑话和表达不再提取包含名称的内容
## [0.11.6] - 2025-12-2
### 🌟 重大更新

View File

@ -370,6 +370,7 @@ class HeartFChatting:
action_to_use_info = await self.action_planner.plan(
loop_start_time=self.last_read_time,
available_actions=available_actions,
force_reply_message=force_reply_message,
)
logger.info(

View File

@ -267,6 +267,7 @@ class ActionPlanner:
self,
available_actions: Dict[str, ActionInfo],
loop_start_time: float = 0.0,
force_reply_message: Optional["DatabaseMessages"] = None,
) -> List[ActionPlannerInfo]:
# sourcery skip: use-named-expression
"""
@ -325,6 +326,34 @@ class ActionPlanner:
loop_start_time=loop_start_time,
)
# 如果有强制回复消息,确保回复该消息
if force_reply_message:
# 检查是否已经有回复该消息的 action
has_reply_to_force_message = False
for action in actions:
if action.action_type == "reply" and action.action_message and action.action_message.message_id == force_reply_message.message_id:
has_reply_to_force_message = True
break
# 如果没有回复该消息,强制添加回复 action
if not has_reply_to_force_message:
# 移除所有 no_reply action如果有
actions = [a for a in actions if a.action_type != "no_reply"]
# 创建强制回复 action
available_actions_dict = dict(current_available_actions)
force_reply_action = ActionPlannerInfo(
action_type="reply",
reasoning="用户提及了我,必须回复该消息",
action_data={"loop_start_time": loop_start_time},
action_message=force_reply_message,
available_actions=available_actions_dict,
action_reasoning=None,
)
# 将强制回复 action 放在最前面
actions.insert(0, force_reply_action)
logger.info(f"{self.log_prefix} 检测到强制回复消息,已添加回复动作")
logger.info(
f"{self.log_prefix}Planner:{reasoning}。选择了{len(actions)}个动作: {' '.join([a.action_type for a in actions])}"
)

View File

@ -56,7 +56,7 @@ TEMPLATE_DIR = os.path.join(PROJECT_ROOT, "template")
# 考虑到实际上配置文件中的mai_version是不会自动更新的,所以采用硬编码
# 对该字段的更新请严格参照语义化版本规范https://semver.org/lang/zh-CN/
MMC_VERSION = "0.12.0-snapshot.1"
MMC_VERSION = "0.12.0"
def get_key_comment(toml_table, key):