feat(agent): enhance chunk search functionality to include total chunk counts

- Updated the searchChunks method to calculate and include the total chunk count for each knowledge ID in the results.
- Introduced logic to fetch chunk counts based on unique knowledge IDs, improving the efficiency of data retrieval.
- Enhanced error handling for chunk count fetching, ensuring robust logging in case of failures.
This commit is contained in:
wizardchen
2026-03-24 22:35:29 +08:00
committed by lyingbug
parent 3daaabfc4a
commit ac04a8efcb
3 changed files with 59 additions and 2 deletions
@@ -0,0 +1,4 @@
DO $$ BEGIN RAISE NOTICE '[Migration 000026] Dropping chunks query indexes'; END $$;
DROP INDEX IF EXISTS idx_chunks_kb_tenant;
DROP INDEX IF EXISTS idx_chunks_knowledge_enabled;