fix: stop sending context compaction notifications

This commit is contained in:
Arthur K. authored and Xubin Ren committed 2026-09-30 13:44:42 +08:00
1 parent fbe9b4fd72
commit 0b402d0414
31 files changed
+157 -38

No files matched your search

+6 -1
View File
@@ -67,7 +67,12 @@ def _bind_events(
)
async def publish(event: AgentEvent) -> None:
if not accepts(type(event)):
# A maintenance result destination does not own the internal context.
if is_internal_session(session_key) and isinstance(event, ContextCompactionEvent):
return
if not notification_is_deliverable(
event, channel=channel, publish_lifecycle=route.publish_lifecycle,
):
return
await bus.publish_event(
event, channel=channel, chat_id=chat_id, metadata=deepcopy(metadata),