[PR #6660] [MERGED] feat(lorebooks): add Slurp generation filter and show package filters only when installed #7274

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6660
Author: @Gunterlie
Created: 9/25/2026
Status: ✅ Merged
Merged: 9/25/2026
Merged by: @Gunterlie

Base: staging ← Head: feat/lorebook-slurp-generation-filter


📝 Commits (4)

  • 066add2 feat(lorebooks): add Slurp generation filter and show package filters only when installed
  • 27282bd style: format lorebook filter e2e
  • b292654 docs(changelog): link lorebook package filter PR
  • 7aee4df test(lorebooks): cover package removal keeping hidden generation filters

📊 Changes

3 files changed (+81 additions, -14 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 e2e/core-flows.e2e.ts (+57 -12)
📝 packages/client/src/components/lorebooks/LorebookEntryRow.tsx (+22 -2)

📄 Description

Why

Slurp Remastered (slurp2) already scans lorebooks with the "slurp" generation trigger (packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-generation-service.ts in Marinara-Agents), just like Noodle sends "noodle". Lorebook entries had no way to target that trigger, so authors could not keep Slurp-only lore out of chats or vice versa.

At the same time, the Noodle chip showed for everyone, even users who never installed Noodle. Package-specific triggers should only appear when the package can actually send them.

What changed

  • Lorebook entry Generation filters add a Slurp chip ("slurp").
  • The Noodle and Slurp chips show only while the noodle / slurp2 package is installed and active, using the same check as ChatSettingsDrawer.
  • A saved noodle / slurp value stays on the entry when its package is removed (the chip is hidden, the value is kept, and toggling other chips does not drop it). Reinstalling the package brings the chip back.
  • The existing Lorebook filter-chip e2e now checks that both chips are hidden without packages, then mocks both packages installed and checks that Noodle and Slurp persist.

No Marinara-Agents change is needed: Slurp2 already sends generationTriggers: ["slurp"] from its only lorebook scan.

Linked issue

No linked issue. This is a small follow-up to #3844 (#3842, the Noodle generation filter).

Manual verification

  • Without Noodle or Slurp Remastered installed, open a lorebook entry → Context filters & matching sources, and verify that the Generation row has no Noodle or Slurp chip.
  • Install Noodle and Slurp Remastered, and verify that both chips appear.
  • Set an entry to Generation "Only → Slurp", turn on Lorebook context in Slurp Remastered, and verify that the entry reaches Slurp posts but not normal chats.
  • Uninstall Slurp Remastered and verify that the chip is hidden and the entry keeps its saved slurp filter.

Summary by CodeRabbit

  • New Features
    • Lorebook generation filters include triggers from Noodle and Slurp when their packages are installed. Package-specific filter options are hidden when the corresponding package is unavailable.
  • Bug Fixes
    • Saved trigger selections remain on lorebook entries when a package is removed. Other filter changes do not clear these saved selections, so they remain available if the package is installed again.

🔄 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/6660 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 9/25/2026 **Status:** ✅ Merged **Merged:** 9/25/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `feat/lorebook-slurp-generation-filter` --- ### 📝 Commits (4) - [`066add2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/066add28c3d87051a5ef35fa181790636b207af2) feat(lorebooks): add Slurp generation filter and show package filters only when installed - [`27282bd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/27282bdd01f2c10b40e8d985ee487f36cd86b1bf) style: format lorebook filter e2e - [`b292654`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b2926546706ea7ee6c928f33ac1598584b0b2019) docs(changelog): link lorebook package filter PR - [`7aee4df`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7aee4dfafb9da89cde6a585c6eea2460ff9a2c61) test(lorebooks): cover package removal keeping hidden generation filters ### 📊 Changes **3 files changed** (+81 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `e2e/core-flows.e2e.ts` (+57 -12) 📝 `packages/client/src/components/lorebooks/LorebookEntryRow.tsx` (+22 -2) </details> ### 📄 Description ## Why Slurp Remastered (`slurp2`) already scans lorebooks with the `"slurp"` generation trigger (`packages/slurp2/src/engine/packages/server/src/slp/features/feed/slp-generation-service.ts` in Marinara-Agents), just like Noodle sends `"noodle"`. Lorebook entries had no way to target that trigger, so authors could not keep Slurp-only lore out of chats or vice versa. At the same time, the Noodle chip showed for everyone, even users who never installed Noodle. Package-specific triggers should only appear when the package can actually send them. ## What changed - Lorebook entry **Generation** filters add a **Slurp** chip (`"slurp"`). - The **Noodle** and **Slurp** chips show only while the `noodle` / `slurp2` package is installed and `active`, using the same check as `ChatSettingsDrawer`. - A saved `noodle` / `slurp` value stays on the entry when its package is removed (the chip is hidden, the value is kept, and toggling other chips does not drop it). Reinstalling the package brings the chip back. - The existing Lorebook filter-chip e2e now checks that both chips are hidden without packages, then mocks both packages installed and checks that Noodle and Slurp persist. No Marinara-Agents change is needed: Slurp2 already sends `generationTriggers: ["slurp"]` from its only lorebook scan. ## Linked issue No linked issue. This is a small follow-up to #3844 (#3842, the Noodle generation filter). ## Manual verification - [ ] Without Noodle or Slurp Remastered installed, open a lorebook entry → Context filters & matching sources, and verify that the Generation row has no Noodle or Slurp chip. - [ ] Install Noodle and Slurp Remastered, and verify that both chips appear. - [ ] Set an entry to Generation "Only → Slurp", turn on Lorebook context in Slurp Remastered, and verify that the entry reaches Slurp posts but not normal chats. - [ ] Uninstall Slurp Remastered and verify that the chip is hidden and the entry keeps its saved `slurp` filter. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Lorebook generation filters include triggers from Noodle and Slurp when their packages are installed. Package-specific filter options are hidden when the corresponding package is unavailable. * **Bug Fixes** * Saved trigger selections remain on lorebook entries when a package is removed. Other filter changes do not clear these saved selections, so they remain available if the package is installed again. <!-- 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:18:09 +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#7274
No description provided.