ruff
This commit is contained in:
@@ -565,7 +565,9 @@ class HeartFChatting:
|
||||
else:
|
||||
success, reply_text = result
|
||||
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
|
||||
|
||||
except Exception as e:
|
||||
|
||||
@@ -136,7 +136,9 @@ class ActionProcessor(BaseProcessor):
|
||||
reply_sequence.append(action_type == "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":
|
||||
result["add"].append("exit_focus_chat")
|
||||
result["remove"].append("no_reply")
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import asyncio
|
||||
from src.config.config import global_config
|
||||
from typing import Optional, Dict
|
||||
import traceback
|
||||
from src.common.logger_manager import get_logger
|
||||
|
||||
@@ -361,7 +361,6 @@ class SubHeartflow:
|
||||
await self._stop_normal_chat()
|
||||
await self._stop_heart_fc_chat()
|
||||
|
||||
|
||||
# 取消可能存在的旧后台任务 (self.task)
|
||||
if self.task and not self.task.done():
|
||||
logger.debug(f"{self.log_prefix} 取消子心流主任务 (Shutdown)...")
|
||||
|
||||
Reference in New Issue
Block a user