diff --git a/src/gatekeeper.py b/src/gatekeeper.py index 05a8f14..660b19d 100644 --- a/src/gatekeeper.py +++ b/src/gatekeeper.py @@ -101,8 +101,10 @@ class ContextGatekeeper: # 如需进一步裁剪,可在 Block 内部按句子级别筛选 # 7. 更新活跃话题 - if not switched and query_anchors: + if query_anchors: self._active_topic = (query_anchors, self.anchor_extractor._idf_cache) + if not switched and query_anchors: + self.topic_gate.update_active_topic(query_anchors, self.anchor_extractor._idf_cache) # 8. 格式化为输出 result = [