mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4431] [MERGED] fix(chat): name the inherited source when dropping an already-active lorebook #6378
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#6378
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/4431
Author: @Gunterlie
Created: 8/1/2026
Status: ✅ Merged
Merged: 8/1/2026
Merged by: @Gunterlie
Base:
staging← Head:fix/lorebook-drop-inherited-source📝 Commits (6)
4298e80fix(chat): name the inherited source when dropping an already-active lorebookee1e2d8Merge branch 'staging' into fix/lorebook-drop-inherited-source47cde07fix(chat): resolve lorebook sources against the revalidated registry7774adcMerge remote-tracking branch 'gunterlie/fix/lorebook-drop-inherited-source' into fix/lorebook-drop-inherited-source772be70Merge branch 'staging' into fix/lorebook-drop-inherited-source1aaf4f4Merge branch 'staging' into fix/lorebook-drop-inherited-source📊 Changes
4 files changed (+161 additions, -15 deletions)
View changed files
📝
packages/client/src/components/chat/ChatResourceDropOverlay.tsx(+35 -10)📝
packages/client/src/lib/chat-resource-drop-capabilities.ts(+33 -4)📝
packages/client/src/localization/locales/en.json(+2 -0)📝
scripts/regressions/chat-resource-drop.regression.ts(+91 -1)📄 Description
Closes #4430
Why
Dragging a lorebook onto a chat only warned "already active" when the book was pinned directly to the chat. If it was already being injected because it is attached to the chat's character or persona, or is global, the drop succeeded with a generic "Added to chat context" and no sign that its entries were already there.
The two cases genuinely differ — pinning survives swapping the character or persona out — so the fix is to keep allowing the drop and name the source, not to start blocking it.
What changed
resolveChatResourceDropActiontakes an optional lorebook list and returnsinheritedFromonadd-lorebooks: the non-pin sources (Character/Persona/Global/Chat) that already make the dropped book active.deriveActiveLorebookViewsresolver — the same one behind the source chips in the chat settings lorebook list — so the drop and that list cannot disagree.Two new
en.jsonstrings; other locales fall back to English.Test plan
pnpm checkpnpm regression:chat-resource-drop🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.