Add mentions to render_message for better BM25 recall

When a question references a user by name/id, sparse search now finds
chunks where that user was mentioned even if not the sender.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
q 2026-04-18 19:59:22 +03:00
parent c0506c49aa
commit 775c874399

View file

@ -101,6 +101,9 @@ def render_message(message: Message) -> str:
else: else:
parts_list.append(part_text) parts_list.append(part_text)
if message.mentions:
parts_list.append(" ".join(message.mentions))
if message.file_snippets: if message.file_snippets:
parts_list.append(f"[Файл]: {message.file_snippets}") parts_list.append(f"[Файл]: {message.file_snippets}")