feat(cross_context): 排除maizone专用上下文组

在获取互通上下文组时,增加了一个判断条件,以排除名为 "maizone_context_group" 的专用组。这可以防止该特定组的上下文信息被意外地泄露给其他不相关的聊天。
This commit is contained in:
minecraft1024a
2025-10-05 21:44:34 +08:00
parent 91034ea4de
commit 0b4e1f5b7b

View File

@@ -37,6 +37,9 @@ async def get_context_groups(chat_id: str) -> list[list[str]] | None:
for group in global_config.cross_context.groups:
# 检查当前聊天的ID和类型是否在组的chat_ids中
if [current_type, str(current_chat_raw_id)] in group.chat_ids:
# 排除maizone专用组
if group.name == "maizone_context_group":
continue
# 返回组内其他聊天的 [type, id] 列表
return [chat_info for chat_info in group.chat_ids if chat_info != [current_type, str(current_chat_raw_id)]]