refactor: simply the code - #3
Conversation
hustcc
commented
Jul 7, 2026
- refactor: simplify the code
There was a problem hiding this comment.
Code Review
This pull request refactors and simplifies the codebase by consolidating the embedding, query expansion, and storage layers, notably replacing EmbedderManager with a unified Embedder class and migrating SynonymExpander to a pure expand function. The review highlights several critical issues to address, including a regression in file loading where switching to Promise.all makes the process fragile to single-file failures, a potential crash in query options destructuring when topK is explicitly undefined, a race condition in the static getPipeline initialization, a typo in the CJK regex range, and a lack of runtime validation for parsed metadata.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.