fix:修复问题

This commit is contained in:
SengokuCola
2025-07-24 22:30:27 +08:00
parent 16b125b815
commit db896299be
6 changed files with 18 additions and 10 deletions

View File

@@ -46,7 +46,7 @@
## 🔥 更新和安装
**最新版本: v0.9.0** ([更新日志](changelogs/changelog.md))
**最新版本: v0.9.1** ([更新日志](changelogs/changelog.md))
可前往 [Release](https://github.com/MaiM-with-u/MaiBot/releases/) 页面下载最新版本
可前往 [启动器发布页面](https://github.com/MaiM-with-u/mailauncher/releases/)下载最新启动器

View File

@@ -1,5 +1,13 @@
# Changelog
## [0.9.1] - 2025-7-25
- 修复表达方式迁移空目录问题
- 修复reply_to空字段问题
- 将metioned bot 和 at应用到focus prompt中
## [0.9.0] - 2025-7-25
### 摘要

View File

@@ -279,10 +279,11 @@ class ActionPlanner:
self.last_obs_time_mark = time.time()
if mode == ChatMode.FOCUS:
if global_config.normal_chat.mentioned_bot_inevitable_reply:
mentioned_bonus = "有人提到你"
if global_config.normal_chat.at_bot_inevitable_reply:
mentioned_bonus = "有人提到你或者at你"
mentioned_bonus = ""
if global_config.chat.mentioned_bot_inevitable_reply:
mentioned_bonus = "\n- 有人提到你"
if global_config.chat.at_bot_inevitable_reply:
mentioned_bonus = "\n- 有人提到你或者at你"
by_what = "聊天内容"
@@ -294,8 +295,7 @@ class ActionPlanner:
动作reply
动作描述:参与聊天回复,发送文本进行表达
- 你想要闲聊或者随便附和
- {mentioned_bonus}
- 你想要闲聊或者随便附和{mentioned_bonus}
- 如果你刚刚进行了回复,不要对同一个话题重复回应
{{
"action": "reply",

View File

@@ -103,7 +103,7 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]:
for nickname in nicknames:
if nickname in message_content:
is_mentioned = True
if is_mentioned and global_config.normal_chat.mentioned_bot_inevitable_reply:
if is_mentioned and global_config.chat.mentioned_bot_inevitable_reply:
reply_probability = 1.0
logger.debug("被提及回复概率设置为100%")
return is_mentioned, reply_probability

View File

@@ -35,7 +35,7 @@ class ClassicalWillingManager(BaseWillingManager):
if interested_rate > 0.2:
current_willing += interested_rate - 0.2
if willing_info.is_mentioned_bot and global_config.normal_chat.mentioned_bot_inevitable_reply and current_willing < 2:
if willing_info.is_mentioned_bot and global_config.chat.mentioned_bot_inevitable_reply and current_willing < 2:
current_willing += 1 if current_willing < 1.0 else 0.05
self.chat_reply_willing[chat_id] = min(current_willing, 1.0)

View File

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