Filter is_system and is_hidden messages in chunking (align with Lotus reference)
Lotus explicitly filters both flags before building chunks. Our _clean_all was only filtering by is_empty, so system/hidden messages with content (e.g. member_event) were included in chunks and polluted the index. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5d50a219bf
commit
fec71a98b9
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ OVERLAP_MESSAGES = 2
|
|||
|
||||
|
||||
def _clean_all(messages: list[Message]) -> list[CleanedMessage]:
|
||||
cleaned = [clean_message(m) for m in messages]
|
||||
cleaned = [clean_message(m) for m in messages if not m.is_system and not m.is_hidden]
|
||||
return [c for c in cleaned if not c.is_empty]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue