🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-06-02 04:46:33 +00:00
parent 78a9709fa2
commit c8fac6c513
2 changed files with 8 additions and 3 deletions

View File

@@ -90,11 +90,16 @@ class CycleDetail:
else: else:
# 只保留中文、英文字母、数字和基本标点 # 只保留中文、英文字母、数字和基本标点
allowed_chars = set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_") allowed_chars = set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_")
self.prefix = "".join(char for char in self.prefix if "\u4e00" <= char <= "\u9fff" or char in allowed_chars) or "group" self.prefix = (
"".join(char for char in self.prefix if "\u4e00" <= char <= "\u9fff" or char in allowed_chars)
or "group"
)
current_time_minute = time.strftime("%Y%m%d_%H%M", time.localtime()) current_time_minute = time.strftime("%Y%m%d_%H%M", time.localtime())
try: try:
self.log_cycle_to_file(log_dir + self.prefix + f"/{current_time_minute}_cycle_" + str(self.cycle_id) + ".json") self.log_cycle_to_file(
log_dir + self.prefix + f"/{current_time_minute}_cycle_" + str(self.cycle_id) + ".json"
)
except Exception as e: except Exception as e:
logger.warning(f"写入文件日志,可能是群名称包含非法字符: {e}") logger.warning(f"写入文件日志,可能是群名称包含非法字符: {e}")

View File

@@ -157,7 +157,7 @@ class FocusChatConfig(ConfigBase):
@dataclass @dataclass
class FocusChatProcessorConfig(ConfigBase): class FocusChatProcessorConfig(ConfigBase):
"""专注聊天处理器配置类""" """专注聊天处理器配置类"""
mind_processor: bool = True mind_processor: bool = True
"""是否启用思维处理器""" """是否启用思维处理器"""