mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1424] [Feature]: Bulk "unvectorize" lorebook entries (clear stored embeddings for selected/all entries) #706
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#706
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?
Originally created by @GetBeholder on GitHub (May 27, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1424
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
When lorebook entries get vectorized — e.g. accidentally, when the entries were
actually meant to trigger via regex/keywords rather than semantic matching — there
is no way to unvectorize them in bulk. The only known workaround is to go entry by
entry, make a tiny edit and undo it so autosave clears the vectorized state, which
is tedious for large lorebooks.
Proposed behavior
Add a bulk action to "unvectorize" selected or all lorebook entries — clearing
their stored embeddings (and/or marking them excluded from vectorization) — as the
inverse of the existing bulk vectorization.
Expected owner or impact area
Refactor branch considerations
From a quick scan (triage pointer, not from the reporter): a lorebook entry's
vectorized state is the
embedding: number[] | nullfield on the entry(
src/engine/contracts/types/lorebook.tsL191-194), withexcludeFromVectorization: booleancontrolling whether bulk vectorization skips itand whether semantic matching ignores any stored vector. An entry is shown as
"Vectorized" when
embeddingis a non-empty array(
src/features/catalog/lorebooks/components/LorebookEntryRow.tsx~L313-315). Theper-entry workaround works because editing the content makes autosave clear/refresh
the stale embedding. Bulk vectorization already exists (referenced by the
excludeFromVectorizationdoc comment); this feature is the inverse — a bulk actionthat sets
embeddingto null (unvectorize) for selected/all entries, e.g. a newbulk hook alongside
useBulkCreateEntries(
src/features/catalog/lorebooks/hooks/use-lorebooks.ts~L285) plus a button in thelorebook editor. Keep the embedding field/contract in the engine and the bulk
action in the lorebooks catalog.
Alternatives considered
The current per-entry workaround (edit an entry slightly, let autosave mark it
changed, then undo the edit), confirmed by community member Wozza and by the in-app
assistant; usable but tedious for many entries. Editing the database manually is
discouraged.
Additional context
Source: forum thread started by m;aemoifmpfmmafe (2-Star), 12:27 AM. The human
maintainer Sunny | Beyond asked whether bulk unvectorize is possible; the in-app
assistant "Professor Mari" confirmed there is no bulk "unvectorize selected/all"
action today and suggested the per-entry workaround. (Professor Mari is Marinara's
in-app AI assistant, not a human maintainer; its own repo search did not locate the
vectorization symbols — the grounding above identifies them.)
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (May 27, 2026):
Agreed.
@SpicyMarinara commented on GitHub (May 27, 2026):
Implemented on
refactor.What changed:
Verification:
git diff --checkpnpm typecheckpnpm lintpnpm check:architecturepnpm buildgraphify update .