This commit is contained in:
SengokuCola
2025-05-27 23:09:50 +08:00
parent 43e465860f
commit 7b05bb3b66
5 changed files with 12 additions and 10 deletions

View File

@@ -565,7 +565,9 @@ class HeartFChatting:
else: else:
success, reply_text = result success, reply_text = result
command = "" command = ""
logger.info(f"{self.log_prefix} 麦麦决定'{action}', 原因'{reasoning}',返回结果'{success}', '{reply_text}', '{command}'") logger.info(
f"{self.log_prefix} 麦麦决定'{action}', 原因'{reasoning}',返回结果'{success}', '{reply_text}', '{command}'"
)
return success, reply_text, command return success, reply_text, command
except Exception as e: except Exception as e:

View File

@@ -136,7 +136,9 @@ class ActionProcessor(BaseProcessor):
reply_sequence.append(action_type == "reply") reply_sequence.append(action_type == "reply")
# 检查no_reply比例 # 检查no_reply比例
if len(recent_cycles) >= (5 * global_config.focus_chat.exit_focus_threshold) and (no_reply_count / len(recent_cycles)) >= (0.75 * global_config.focus_chat.exit_focus_threshold): if len(recent_cycles) >= (5 * global_config.focus_chat.exit_focus_threshold) and (
no_reply_count / len(recent_cycles)
) >= (0.75 * global_config.focus_chat.exit_focus_threshold):
if global_config.chat.chat_mode == "auto": if global_config.chat.chat_mode == "auto":
result["add"].append("exit_focus_chat") result["add"].append("exit_focus_chat")
result["remove"].append("no_reply") result["remove"].append("no_reply")

View File

@@ -1,5 +1,4 @@
import asyncio import asyncio
from src.config.config import global_config
from typing import Optional, Dict from typing import Optional, Dict
import traceback import traceback
from src.common.logger_manager import get_logger from src.common.logger_manager import get_logger

View File

@@ -361,7 +361,6 @@ class SubHeartflow:
await self._stop_normal_chat() await self._stop_normal_chat()
await self._stop_heart_fc_chat() await self._stop_heart_fc_chat()
# 取消可能存在的旧后台任务 (self.task) # 取消可能存在的旧后台任务 (self.task)
if self.task and not self.task.done(): if self.task and not self.task.done():
logger.debug(f"{self.log_prefix} 取消子心流主任务 (Shutdown)...") logger.debug(f"{self.log_prefix} 取消子心流主任务 (Shutdown)...")