chore: perform widespread code cleanup and formatting
Perform a comprehensive code cleanup across multiple modules to improve code quality, consistency, and maintainability. Key changes include: - Removing numerous unused imports. - Standardizing import order. - Eliminating trailing whitespace and inconsistent newlines. - Updating legacy type hints to modern syntax (e.g., `List` -> `list`). - Making minor improvements for code robustness and style.
This commit is contained in:
@@ -376,7 +376,7 @@ class DefaultReplyer:
|
||||
if not prompt:
|
||||
logger.warning("构建prompt失败,跳过回复生成")
|
||||
return False, None, None
|
||||
|
||||
|
||||
from src.plugin_system.core.event_manager import event_manager
|
||||
# 触发 POST_LLM 事件(请求 LLM 之前)
|
||||
if not from_plugin:
|
||||
@@ -1878,8 +1878,8 @@ class DefaultReplyer:
|
||||
async def build_relation_info(self, sender: str, target: str):
|
||||
# 获取用户ID
|
||||
if sender == f"{global_config.bot.nickname}(你)":
|
||||
return f"你将要回复的是你自己发送的消息。"
|
||||
|
||||
return "你将要回复的是你自己发送的消息。"
|
||||
|
||||
person_info_manager = get_person_info_manager()
|
||||
person_id = await person_info_manager.get_person_id_by_person_name(sender)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user