mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #736] [MERGED] Fix macro resolution in lorebooks and regex scripts #4754
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#4754
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/736
Author: @Xelvanis
Created: 5/12/2026
Status: ✅ Merged
Merged: 5/12/2026
Merged by: @Xelvanis
Base:
main← Head:fix/lorebook-regex-macros📝 Commits (2)
eab2ff7fix: resolve macros in lorebooks and regex scriptsb670375Address lorebook macro review comments📊 Changes
22 files changed (+1299 additions, -196 deletions)
View changed files
📝
packages/client/src/components/agents/RegexScriptEditor.tsx(+44 -8)📝
packages/client/src/components/chat/ChatInput.tsx(+6 -5)📝
packages/client/src/components/chat/ChatMessage.tsx(+9 -4)📝
packages/client/src/components/chat/ConversationInput.tsx(+17 -11)📝
packages/client/src/components/game/GameNarration.tsx(+16 -6)📝
packages/client/src/hooks/use-apply-regex.ts(+18 -8)📝
packages/client/src/lib/chat-macros.ts(+18 -2)📝
packages/server/src/routes/chats.routes.ts(+8 -4)📝
packages/server/src/routes/game.routes.ts(+43 -24)📝
packages/server/src/routes/generate.routes.ts(+23 -34)📝
packages/server/src/routes/generate/dry-run-route.ts(+17 -23)📝
packages/server/src/routes/lorebooks.routes.ts(+44 -1)📝
packages/server/src/services/lorebook/index.ts(+321 -15)📝
packages/server/src/services/lorebook/keyword-scanner.ts(+8 -3)📝
packages/server/src/services/prompt/assembler.ts(+13 -8)📝
packages/server/src/services/prompt/index.ts(+2 -0)📝
packages/server/src/services/prompt/macro-context.ts(+34 -2)📝
packages/server/src/services/prompt/marker-expander.ts(+47 -30)📝
packages/server/src/services/regex/regex-application.ts(+18 -5)📝
packages/server/test/lorebook-processing.test.ts(+493 -1)...and 2 more files
📄 Description
Linked issue
#738
Why this change
What changed
{{input}}.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated/local validation run by Codex:
pnpm --filter @marinara-engine/server exec tsx --import ./test/setup-env.ts --test test/lorebook-processing.test.ts test/regex-application.test.tspassed, 30 tests.pnpm --filter @marinara-engine/client lintpassed.pnpm checkpassed.git diff --checkpassed with only line-ending normalization warnings.Server touched-area
console.scan found no matches.Verified through recursive lorebook testing, manual variable lorebook testing, and regex macro live testing. All gave expected results.
Docs and release impact
No docs or release/version files were changed in this branch.
UI evidence (if applicable)
Not included yet. The regex editor live-test behavior should get a quick manual browser check before marking this ready for review.
Summary by CodeRabbit
Release Notes
New Features
Improvements
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.