mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #930] [MERGED] Fix character macro scoping in group replies #4843
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#4843
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/930
Author: @NeoKazuya
Created: 5/17/2026
Status: ✅ Merged
Merged: 5/17/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/924-character-macro-scoping📝 Commits (5)
467751efix: scope character macros per group responder (#924)b3de601Merge branch 'staging' into fix/924-character-macro-scopingd35e14cfix: guard deferred character macro finalization36b79deFix manual group regen character macro target37fea16Merge branch 'staging' into fix/924-character-macro-scoping📊 Changes
6 files changed (+739 additions, -31 deletions)
View changed files
📝
packages/server/src/routes/generate.routes.ts(+63 -7)📝
packages/server/src/services/prompt/assembler.ts(+20 -5)📝
packages/server/src/services/prompt/marker-expander.ts(+27 -2)➕
packages/server/test/character-macro-scoping.test.ts(+498 -0)📝
packages/server/test/macro-engine.test.ts(+46 -1)📝
packages/shared/src/utils/macro-engine.ts(+85 -16)📄 Description
Linked issue
Closes #924
Why this change
{{char}}was resolved during that earlier assembly step, prompt text that should follow the current responding character could be filled with the first character's name instead.What changed
deferCharacterMacros: "all"is used for preset section text and preset variable values such as the Character's POV option. It keeps{{char}},{{charName}}, and character field macros unresolved until Marinara prepares the responding character's model request.deferCharacterMacros: "names"is used for lorebook entries that are included in the prompt. It keeps only{{char}}and{{charName}}unresolved; all other character macros keep their existing behavior.{{char}}usage inside each character's own marker fields and dialogue examples when expanding multi-character marker output.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Second Personand Narrative Perspective toCharacter's.Docs and release impact
UI evidence (if applicable)
No UI changes.
Summary by CodeRabbit
New Features
Improvements
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.