🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -59,7 +59,7 @@ class ActionModifier:
|
||||
|
||||
# === 第一阶段:传统观察处理 ===
|
||||
chat_content = None
|
||||
|
||||
|
||||
if observations:
|
||||
hfc_obs = None
|
||||
chat_obs = None
|
||||
|
||||
@@ -147,10 +147,10 @@ class NoReplyAction(BaseAction):
|
||||
|
||||
# 跳过LLM判断的配置
|
||||
_skip_judge_when_tired = True
|
||||
_skip_probability = 0.5
|
||||
|
||||
_skip_probability = 0.5
|
||||
|
||||
# 新增:回复频率退出专注模式的配置
|
||||
_frequency_check_window = 600 # 频率检查窗口时间(秒)
|
||||
_frequency_check_window = 600 # 频率检查窗口时间(秒)
|
||||
|
||||
# 动作参数定义
|
||||
action_parameters = {"reason": "不回复的原因"}
|
||||
@@ -482,10 +482,10 @@ class NoReplyAction(BaseAction):
|
||||
|
||||
async def _check_frequency_and_exit_focus(self, current_time: float) -> bool:
|
||||
"""检查回复频率,决定是否退出专注模式
|
||||
|
||||
|
||||
Args:
|
||||
current_time: 当前时间戳
|
||||
|
||||
|
||||
Returns:
|
||||
bool: 是否应该退出专注模式
|
||||
"""
|
||||
@@ -493,7 +493,7 @@ class NoReplyAction(BaseAction):
|
||||
# 只在auto模式下进行频率检查
|
||||
if global_config.chat.chat_mode != "auto":
|
||||
return False
|
||||
|
||||
|
||||
# 获取检查窗口内的所有消息
|
||||
window_start_time = current_time - self._frequency_check_window
|
||||
all_messages = message_api.get_messages_by_time_in_chat(
|
||||
@@ -670,7 +670,6 @@ class EmojiAction(BaseAction):
|
||||
return False, f"表情发送失败: {str(e)}"
|
||||
|
||||
|
||||
|
||||
@register_plugin
|
||||
class CoreActionsPlugin(BasePlugin):
|
||||
"""核心动作插件
|
||||
@@ -787,6 +786,8 @@ class CoreActionsPlugin(BasePlugin):
|
||||
# components.append((DeepReplyAction.get_action_info(), DeepReplyAction))
|
||||
|
||||
return components
|
||||
|
||||
|
||||
# class DeepReplyAction(BaseAction):
|
||||
# """回复动作 - 参与聊天回复"""
|
||||
|
||||
@@ -909,5 +910,3 @@ class CoreActionsPlugin(BasePlugin):
|
||||
# data = reply[1]
|
||||
# reply_text += data
|
||||
# return reply_text
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user