mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2849] [Feature]: Allow disabling a character-bound lorebook per chat #1441
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#1441
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 @Romuromylus on GitHub (Jun 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2849
Originally assigned to: @Romuromylus on GitHub.
What problem does this solve?
A lorebook bound to a character (
characterId/characterIds), or a global / active-persona book, is force-activated in every non-game chat where it applies, with no way to turn it off from the chat UI. When several present characters carry overlapping books, entries get injected redundantly and overflow the token budget ("N entries skipped by token budget").The only existing workaround is to unbind the book globally, which removes it from every chat — too coarse, and it does not scale for group conversations where each character legitimately needs its own book elsewhere.
Proposed solution
Add a per-chat exclusion for auto-activated lorebooks:
chatMeta.excludedLorebookIdsin the non-game generation / lorebook-scan / dry-run / prompt-preview paths and pass it to the relevant-lorebook filter. The server filter already honors anexcludedLorebookIdsset (lorebook/index.tsfilterRelevantLorebooks); it was previously only ever fed the Game Lorebook Keeper's exclusions, never the user's per-chat list.Alternatives considered
Additional context
Detailed root-cause analysis and a working local patch were contributed by Evie [MARI] on Discord — credit to them for the diagnosis:
excludedLorebookIdsis honored by the server filter but never read from chat metadata on the non-game path; the clienttoggleLorebook()only touchesactiveLorebookIds; and the chat Lorebooks list only rendered a remove control for pinned books, so auto-activated books had no disable affordance. Reported against v2.0.4 (b5461ad).Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: