mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #812] [MERGED] Add lorebook entry vectorization exclusions #4785
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4785
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/812
Author: @cha1latte
Created: 5/13/2026
Status: ✅ Merged
Merged: 5/14/2026
Merged by: @cha1latte
Base:
main← Head:feat/issue-741-vectorization-exclusions📝 Commits (1)
92b82ceAdd lorebook vectorization exclusions📊 Changes
15 files changed (+86 additions, -16 deletions)
View changed files
📝
packages/client/src/components/lorebooks/LorebookEditor.tsx(+10 -7)📝
packages/client/src/components/lorebooks/LorebookEntryRow.tsx(+26 -5)📝
packages/server/src/db/migrate.ts(+6 -0)📝
packages/server/src/db/schema/lorebooks.ts(+3 -0)📝
packages/server/src/routes/generate.routes.ts(+3 -1)📝
packages/server/src/routes/lorebooks.routes.ts(+6 -2)📝
packages/server/src/services/import/marinara.importer.ts(+1 -0)📝
packages/server/src/services/lorebook/keyword-scanner.ts(+1 -0)📝
packages/server/src/services/storage/lorebooks.storage.ts(+6 -1)📝
packages/server/test/db-migrations.test.ts(+1 -0)📝
packages/server/test/knowledge-router.test.ts(+1 -0)📝
packages/server/test/lorebook-processing.test.ts(+17 -0)📝
packages/server/test/lorebooks-routes.test.ts(+1 -0)📝
packages/shared/src/schemas/lorebook.schema.ts(+2 -0)📝
packages/shared/src/types/lorebook.ts(+2 -0)📄 Description
Linked issue
Closes #741
Why this change
Lorebooks could only vectorize every entry together, which made key-only entries discoverable through semantic search even when users wanted them to activate only through explicit keys.
What changed
excludeFromVectorizationflag across shared types, schemas, storage, import, and migration paths.No Vector, plus overview/row status updates that count excluded entries separately.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm --filter @marinara-engine/shared buildpassed.pnpm --filter @marinara-engine/server exec tsx --import ./test/setup-env.ts --test test/lorebook-processing.test.ts test/db-migrations.test.tspassed: 33 tests.pnpm checkpassed.pnpm db:pushwas attempted for the schema change, but this checkout has nodb:pushscript (Command "db:push" not found).PORT=7861, created a lorebook entry withexcludeFromVectorization: true, opened it in the real lorebook editor, and verified the entry row shows the vector-excluded state, the expanded drawer showsNo Vector, and the overview reports0/0 entries vectorizedwith1 excluded.Docs and release impact
UI evidence (if applicable)
Verified in the local app with Playwright MCP. Screenshots were captured locally for the implementation run but are not attached to this PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.