Skip to content

refactor: simply the code - #3

Merged
hustcc merged 4 commits into
masterfrom
simplify-code
Jul 8, 2026
Merged

refactor: simply the code#3
hustcc merged 4 commits into
masterfrom
simplify-code

Conversation

@hustcc

@hustcc hustcc commented Jul 7, 2026

Copy link
Copy Markdown
Member
  • refactor: simplify the code

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/context.ts
Comment thread src/context.ts
Comment thread src/embedder/embedder.ts
Comment thread src/expander/expand.ts
Comment thread src/embedder/embedder.ts
Comment thread src/context.ts
@lxfu1
lxfu1 self-requested a review July 8, 2026 02:16
@hustcc
hustcc merged commit 8f705a2 into master Jul 8, 2026
2 checks passed
@hustcc
hustcc deleted the simplify-code branch July 8, 2026 03:32
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