[PR #4155] [MERGED] Add lorebook Outlets and streamline Roleplay typing #6258

Closed
opened 2026-10-23 04:08:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4155
Author: @SpicyMarinara
Created: 7/27/2026
Status: ✅ Merged
Merged: 7/27/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/lorebook-outlets-roleplay-typing


📝 Commits (2)

  • 6f91d90 Add lorebook Outlets and streamline Roleplay typing
  • 35ec2e0 Address lorebook Outlet review edge cases

📊 Changes

28 files changed (+404 additions, -65 deletions)

View changed files

📝 docs/lorebooks/entries.md (+5 -1)
📝 docs/prompts/macros.md (+8 -0)
📝 packages/client/src/components/chat/ChatArea.tsx (+2 -2)
📝 packages/client/src/components/chat/ChatInput.tsx (+16 -2)
📝 packages/client/src/components/chat/ChatMessage.tsx (+32 -18)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+3 -5)
📝 packages/client/src/components/chat/ConversationView.tsx (+1 -1)
📝 packages/client/src/components/lorebooks/LorebookEntryRow.tsx (+51 -9)
📝 packages/client/src/localization/locales/en.json (+13 -1)
📝 packages/client/src/stores/chat.store.ts (+40 -6)
📝 packages/server/src/db/schema/lorebooks.ts (+2 -0)
📝 packages/server/src/routes/backup.routes.ts (+2 -0)
📝 packages/server/src/routes/lorebooks.routes.ts (+3 -0)
📝 packages/server/src/services/import/marinara.importer.ts (+3 -1)
📝 packages/server/src/services/import/st-lorebook.importer.ts (+4 -0)
📝 packages/server/src/services/lorebook/character-book-sync.ts (+2 -1)
📝 packages/server/src/services/lorebook/index.ts (+2 -0)
📝 packages/server/src/services/lorebook/prompt-injector.ts (+20 -3)
📝 packages/server/src/services/mari-db/mari-db.service.ts (+21 -7)
📝 packages/server/src/services/prompt/assembler.ts (+16 -1)

...and 8 more files

📄 Description

Why

Roleplay typing still caused broad reactive updates while a draft changed, and Marinara did not support SillyTavern-compatible lorebook Outlet entries requested in #4154.

What changed

  • keep exact Roleplay draft text outside the broad chat-store subscription path while exposing a delayed presence signal only where UI controls need it
  • isolate the guided-regeneration control from heavy message rendering
  • add named, case-sensitive lorebook Outlets using {{outlet::name}} in Conversation, Roleplay, and Game prompt sections
  • preserve Outlet position 7 and outletName through storage, native/compatible import and export, character-book sync, backups, and Mari DB actions
  • add localized editor controls, macro reference copy, English documentation, and regression coverage

Closes #4154.

Validation

  • pnpm check
  • pnpm regression:prompt
  • pnpm regression:roleplay
  • pnpm smoke:ui — 133 passed, 72 skipped; three unrelated stale expectations remain (UI store version 84 vs 85, and the catalog test clicking Add Repository while the Danger Zone gate correctly disables it on desktop/mobile)

Manual verification

  • Manually verify that Roleplay typing remains immediate during a long chat.
  • Manually verify selecting Outlet reveals the Outlet name field on desktop and mobile.
  • Manually verify two activated entries sharing an Outlet name appear at the macro in Order and nowhere else.
  • Manually verify SillyTavern-compatible Outlet import/export round-trips position 7 and the Outlet name.

Summary by CodeRabbit

  • New Features
    • Added named Lorebook Outlets using the {{outlet::name}} macro.
    • Added Outlet configuration, exact name matching, ordering, and combined entry support.
    • Added Outlet support for lorebook imports, exports, transfers, and character books.
  • Bug Fixes
    • Improved draft-input detection and reduced unnecessary chat UI updates.
    • Improved regeneration behavior and guided regenerate controls.
  • Documentation
    • Documented Outlet configuration, macro usage, matching rules, and limitations.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4155 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/27/2026 **Status:** ✅ Merged **Merged:** 7/27/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/lorebook-outlets-roleplay-typing` --- ### 📝 Commits (2) - [`6f91d90`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6f91d90b46fefba741446e49a7efb2ab54029b00) Add lorebook Outlets and streamline Roleplay typing - [`35ec2e0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/35ec2e036388a7977959b79546a30ef09dbed801) Address lorebook Outlet review edge cases ### 📊 Changes **28 files changed** (+404 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `docs/lorebooks/entries.md` (+5 -1) 📝 `docs/prompts/macros.md` (+8 -0) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+2 -2) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+16 -2) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+32 -18) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+3 -5) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+1 -1) 📝 `packages/client/src/components/lorebooks/LorebookEntryRow.tsx` (+51 -9) 📝 `packages/client/src/localization/locales/en.json` (+13 -1) 📝 `packages/client/src/stores/chat.store.ts` (+40 -6) 📝 `packages/server/src/db/schema/lorebooks.ts` (+2 -0) 📝 `packages/server/src/routes/backup.routes.ts` (+2 -0) 📝 `packages/server/src/routes/lorebooks.routes.ts` (+3 -0) 📝 `packages/server/src/services/import/marinara.importer.ts` (+3 -1) 📝 `packages/server/src/services/import/st-lorebook.importer.ts` (+4 -0) 📝 `packages/server/src/services/lorebook/character-book-sync.ts` (+2 -1) 📝 `packages/server/src/services/lorebook/index.ts` (+2 -0) 📝 `packages/server/src/services/lorebook/prompt-injector.ts` (+20 -3) 📝 `packages/server/src/services/mari-db/mari-db.service.ts` (+21 -7) 📝 `packages/server/src/services/prompt/assembler.ts` (+16 -1) _...and 8 more files_ </details> ### 📄 Description ## Why Roleplay typing still caused broad reactive updates while a draft changed, and Marinara did not support SillyTavern-compatible lorebook Outlet entries requested in #4154. ## What changed - keep exact Roleplay draft text outside the broad chat-store subscription path while exposing a delayed presence signal only where UI controls need it - isolate the guided-regeneration control from heavy message rendering - add named, case-sensitive lorebook Outlets using `{{outlet::name}}` in Conversation, Roleplay, and Game prompt sections - preserve Outlet position `7` and `outletName` through storage, native/compatible import and export, character-book sync, backups, and Mari DB actions - add localized editor controls, macro reference copy, English documentation, and regression coverage Closes #4154. ## Validation - `pnpm check` - `pnpm regression:prompt` - `pnpm regression:roleplay` - `pnpm smoke:ui` — 133 passed, 72 skipped; three unrelated stale expectations remain (UI store version 84 vs 85, and the catalog test clicking Add Repository while the Danger Zone gate correctly disables it on desktop/mobile) ## Manual verification - [ ] Manually verify that Roleplay typing remains immediate during a long chat. - [ ] Manually verify selecting Outlet reveals the Outlet name field on desktop and mobile. - [ ] Manually verify two activated entries sharing an Outlet name appear at the macro in Order and nowhere else. - [ ] Manually verify SillyTavern-compatible Outlet import/export round-trips position 7 and the Outlet name. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added named Lorebook Outlets using the `{{outlet::name}}` macro. * Added Outlet configuration, exact name matching, ordering, and combined entry support. * Added Outlet support for lorebook imports, exports, transfers, and character books. * **Bug Fixes** * Improved draft-input detection and reduced unnecessary chat UI updates. * Improved regeneration behavior and guided regenerate controls. * **Documentation** * Documented Outlet configuration, macro usage, matching rules, and limitations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:08:41 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6258
No description provided.