Skip to content

fix(conversation): scope L0 search candidates by session#244

Open
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/local-store-conversation-filter
Open

fix(conversation): scope L0 search candidates by session#244
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/local-store-conversation-filter

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pass the optional sessionKey from tdai_conversation_search down into L0 store searches before candidate limiting
  • add L0 search filter support to the store interface, SQLite FTS/vector paths, and TCVDB L0 hybrid search
  • keep the existing tool-level post-filter as a defensive final guard

Root cause

executeConversationSearch accepted sessionKey, but searched global L0 candidates first and only filtered after FTS/vector results were already limited. If other sessions occupied the top candidates, the requested session could return no messages even when matching L0 rows existed.

Verification

  • npx vitest run src/core/tools/conversation-search.test.ts (RED before fix, green after)
  • npm test
  • npm run build
  • git diff --check

Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Awesome work! 13 fixes in one batch covering Gateway hardening, embedding compatibility, Hermes memory injection, offload stability, and pipeline optimization — a very productive cleanup session 👏

We'll review and merge them one by one 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants