mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6809] [MERGED] feat(lorebooks): attach reference images and add wardrobe keyword #7337
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#7337
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/6809
Author: @Gunterlie
Created: 9/28/2026
Status: ✅ Merged
Merged: 9/28/2026
Merged by: @SpicyMarinara
Base:
staging← Head:dressed-in-lore📝 Commits (10+)
2a84beefeat(lorebooks): attach visual reference images and wardrobe keyworda59706ffix(lorebooks): bound import memory and preserve stream errors95483d8Merge remote-tracking branch 'origin/staging' into dressed-in-lored50b39dMerge latest staging into dressed-in-lore7aee282fix(lorebooks): address image review failure paths9ea1ddafix(lorebooks): preserve importer failure result types58bb21cfix(lorebooks): fix Mari entry writes, budgets and review findings for reference images710809dfix(lorebooks): preserve text and image-only outletse94e339merge staging into dressed-in-loref3d47c3fix(lorebooks): atomically replace imported entries📊 Changes
34 files changed (+2745 additions, -347 deletions)
View changed files
📝
CHANGELOG.md(+6 -0)➕
e2e/lorebook-images.e2e.ts(+437 -0)➕
packages/client/src/components/lorebooks/LorebookEntryImages.tsx(+272 -0)📝
packages/client/src/components/lorebooks/LorebookEntryRow.tsx(+36 -2)📝
packages/client/src/hooks/use-generate.ts(+16 -0)📝
packages/client/src/hooks/use-lorebooks.ts(+29 -4)📝
packages/client/src/localization/locales/en.json(+19 -0)📝
packages/server/src/db/schema/lorebooks.ts(+3 -0)📝
packages/server/src/routes/backup.routes.ts(+25 -3)📝
packages/server/src/routes/characters.routes.ts(+8 -3)📝
packages/server/src/routes/generate.routes.ts(+31 -7)📝
packages/server/src/routes/generate/dry-run-route.ts(+22 -1)📝
packages/server/src/routes/lorebooks.routes.ts(+82 -3)➕
packages/server/src/services/generation/lorebook-image-prompt.ts(+72 -0)📝
packages/server/src/services/generation/provider-generation-runtime.ts(+2 -0)📝
packages/server/src/services/import/marinara.importer.ts(+166 -147)📝
packages/server/src/services/import/st-character.importer.ts(+2 -0)📝
packages/server/src/services/import/st-lorebook.importer.ts(+174 -118)📝
packages/server/src/services/llm/connection-fallback-provider.ts(+16 -12)➕
packages/server/src/services/llm/lorebook-image-provider.ts(+99 -0)...and 14 more files
📄 Description
Linked issue
Closes #6798
Why this change
Lorebook entries need visual references alongside descriptions of characters, outfits, objects and techniques. Activated entries can now supply reference images to compatible chat models, with text preserved when optional images do not fit or the provider rejects image input.
What changed
wardrobekeyword.Validation
pnpm checkpasses locallyCONTRIBUTING.mdRecorded verification
Latest local revision:
99ea4b8695e3812f6a4645727b5ede8da6421be4, based on staging193425b670.Latest revision adds only the requested ordinary-upload rollback assertion: the uploaded file remains present until the route handles the attachment failure, then the directory exactly matches its original contents. Both missing-file cases remain. The actual route regression passes 1/1, Prettier and
git diff --checkpass. Product code is identical to60b934b97; the broader results below apply to that unchanged code.Product revision
60b934b97:pnpm checkpasses, including localization, formatting, type/lint checks and the production build; smoke passes 7/7; the actual upload-route regression passes 1/1; the expanded editor proof passes 3/3 across desktop Chromium, mobile Chromium and mobile WebKit.The latest browser proof covers upload/removal, caption saves, remounts, delayed refreshes, exact copied image data, failed-removal recovery, valid empty-MIME images accepted and invalid bytes rejected by the server. The route proof preserves the original attachment error despite a real cleanup ENOENT and retains the image-limit response and saved image state.
The preceding integrated revision
379d4d3cdpassed prompt regressions 3/3, focused lorebook regressions 17/17, and the provider-facing desktop case 1/1. The latest change is confined to the image-operation UI lifecycle, MIME guard, cleanup error handling and their focused proofs.Latest local CodeRabbit review completed with zero findings across the seven follow-up files. Earlier substantive findings were fixed; one earlier request for a 413-propagation test was dismissed because the retained valid-image/shared-budget assertion already covers it and passed.
Independent source review is clear. Before/after proofs also cover mixed/image-only/recursive budgets, shared/legacy reimport links and corrupt-image export accounting. The earlier deterministic reimport concurrency proof passed; queue ordering was independently reviewed. The staging integration passed parent-file and automatic-merge equivalence checks.
Required GitHub checks and an actual CodeRabbit review of the published latest head remain merge gates. These results do not claim that pending hosted checks have passed.
Manual verification still needed
Automated mobile WebKit coverage is recorded separately; it is not a claim of physical-device testing. Human checklist states are unchanged.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Updated
CHANGELOG.md. No version-bearing files or translated documentation changed.UI evidence
Before/after upload, removal, unknown-MIME and delayed-refresh screenshots are embedded in the gist's standalone HTML file. Download/open it to inspect the images. These are isolated fixtures; DOM assertions prove the pending-state boundaries, and screenshots show the real desktop/mobile UI.
Summary by CodeRabbit
wardrobeactivation key.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.