From 2f9dc64d1e80a14aa3b83cb3ca74d089e6700645 Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Sun, 12 Oct 2025 13:08:41 +0800 Subject: [PATCH] =?UTF-8?q?refactor(maizone):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=96=87=E6=A1=88=E6=97=B6=E5=AF=B9=E8=B7=A8?= =?UTF-8?q?=E7=BE=A4=E8=81=8A=E4=B8=8A=E4=B8=8B=E6=96=87=E7=9A=84=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 此更改删除了在生成内容时获取和注入跨群聊上下文(`maizone_context_group`)的逻辑。 该功能已被新的、更通用的 S4U 上下文检索机制所取代,因此旧的硬编码实现不再需要,移除它可以简化代码并消除冗余。 --- .../built_in/maizone_refactored/services/content_service.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/plugins/built_in/maizone_refactored/services/content_service.py b/src/plugins/built_in/maizone_refactored/services/content_service.py index 4761c4114..1a0ef9183 100644 --- a/src/plugins/built_in/maizone_refactored/services/content_service.py +++ b/src/plugins/built_in/maizone_refactored/services/content_service.py @@ -17,7 +17,6 @@ from src.common.logger import get_logger from src.config.api_ada_configs import TaskConfig from src.llm_models.utils_model import LLMRequest from src.plugin_system.apis import config_api, generator_api, llm_api -from src.plugin_system.apis.cross_context_api import get_chat_history_by_group_name # 导入旧的工具函数,我们稍后会考虑是否也需要重构它 from ..utils.history_utils import get_send_history @@ -88,11 +87,6 @@ class ContentService: if context: prompt += f"\n作为参考,这里有一些最近的聊天记录:\n---\n{context}\n---" - # 添加跨群聊上下文 - cross_context = await get_chat_history_by_group_name("maizone_context_group") - if cross_context and "找不到名为" not in cross_context: - prompt += f"\n\n---跨群聊参考---\n{cross_context}\n---" - # 添加历史记录以避免重复 prompt += "\n\n---历史说说记录---\n" history_block = await get_send_history(qq_account)