mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2587] [MERGED] feat(lorebooks): duplicate lorebook entry #5673
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#5673
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/2587
Author: @kolacheee
Created: 6/16/2026
Status: ✅ Merged
Merged: 6/16/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/staging-duplicate-lorebook-entry📝 Commits (3)
d325599feat(lorebooks): duplicate lorebook entryeb8cdfffix(lorebooks): duplicate from current row state to avoid stale clone6d9b3dfGuard lorebook entry duplication during edits📊 Changes
2 files changed (+76 additions, -1 deletions)
View changed files
📝
packages/client/src/components/lorebooks/LorebookEntryRow.tsx(+56 -1)📝
packages/client/src/hooks/use-lorebooks.ts(+20 -0)📄 Description
Linked issue
Closes #2578
Why this change
refactor#2157.What changed
useDuplicateLorebookEntry(hooks/use-lorebooks.ts) — clones an entry through the existingPOST /lorebooks/:id/entriescreate path. The create schema drops server-managedid/createdAt/updatedAtand the route re-deriveslorebookId, so the name gets a" (Copy)"suffix and every other field carries over verbatim (keys/secondaryKeys, all character/tag/trigger filters, position/depth/order, probability, timing, grouping, role, embedding, activation conditions). Invalidates the same queries asuseCreateLorebookEntry.components/lorebooks/LorebookEntryRow.tsx) — aCopy-icon button in the per-row actions, immediately left of delete. Mirrors delete's hover-reveal pattern (always visible on mobile), neutral styling, disabled while the clone is in flight.No backend changes — lorebook entries have no managed on-disk asset, so duplication is a pure client-side row clone over the existing create endpoint.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
tsc -b+ ESLint pass for the client."… (Copy)"entry appears with all those fields carried overDocs and release impact
Assessment: additive QoL — no docs/version changes expected.
UI evidence (if applicable)
Screenshots to follow.
Summary by CodeRabbit
Release Notes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.