feat(caching, vector database): implement local vector cache with incremental indexing & title blending#12
Conversation
0c8af05 to
a68c506
Compare
|
It seems like this branch is based on |
|
Resolved merge and declaration conflicts 👍 Ready to review |
There was a problem hiding this comment.
Pull request overview
This PR adds a local vector caching layer (backed by Vectra) and updates the embedding/indexing pipeline to skip redundant inference work by hashing note content and reusing cached vectors. It also adjusts Webpack configuration to work around native-binary packaging issues stemming from transitive imports.
Changes:
- Added a
VectorCachewrapper aroundvectra’sLocalIndex, including SHA-256 content hashing and basic CRUD operations. - Updated the embedding test command to support incremental indexing (cache hits), deletions cleanup, and persisted cache upserts.
- Updated Webpack bundling and project dependencies to integrate
vectraand avoid bundling nativeonnxruntime-nodeartifacts.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
webpack.config.js |
Adds Webpack externals to avoid traversing onnxruntime-node/@huggingface/transformers from vectra exports; updates archive build config. |
src/pipeline/vectorCache.ts |
Introduces a local vector cache abstraction using vectra + SHA-256 hashing. |
src/commands/testEmbed.ts |
Adds cache hit bypass, incremental indexing, and deletion cleanup to the embedding pipeline. |
package.json |
Adds vectra dependency. |
package-lock.json |
Locks vectra and its transitive dependencies (including engine/peer constraints). |
.npmrc |
Enables legacy-peer-deps to bypass peer dependency resolution failures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5a37111 to
949448f
Compare
HahaBill
left a comment
There was a problem hiding this comment.
Everything seems to look good for now. Thank you for this PR :)
This PR implements the local vector caching layer and incremental note indexing pipeline for the Joplin Note Categorization Plugin. It optimizes the embedding process by avoiding redundant model inference calls for notes that have not changed.
Changes
Verification & Test cases
Below are the logs and results for the four key verification scenarios: