mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6957] [MERGED] feat(macros): character ID names for chat members, an include macro, and until/while decisions #7402
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#7402
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/6957
Author: @SpicyMarinara
Created: 10/1/2026
Status: ✅ Merged
Merged: 10/2/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/macro-sweep📝 Commits (7)
370d124fix(macros): resolve character ID macros for chat membersea68da5feat(macros): add an include macro for lorebook entries1627c7ffeat(decisions): add until and while to decision blocks0fb24a2Merge remote-tracking branch 'origin/staging' into fix/macro-sweep60e0ee6Merge remote-tracking branch 'origin/staging' into fix/macro-sweep9c55194Merge remote-tracking branch 'origin/staging' into fix/macro-sweepf1ea4d3chore(lorebook): note when the include source is loaded📊 Changes
16 files changed (+1078 additions, -29 deletions)
View changed files
📝
CHANGELOG.md(+4 -0)📝
docs/lorebooks/entries.md(+1 -0)📝
docs/prompts/conditional-prompts.md(+34 -0)📝
docs/prompts/macros.md(+21 -2)📝
packages/server/src/routes/chats.routes.ts(+4 -1)📝
packages/server/src/routes/generate.routes.ts(+4 -1)📝
packages/server/src/routes/generate/dry-run-route.ts(+4 -1)📝
packages/server/src/services/decision/decision-timers.ts(+64 -7)📝
packages/server/src/services/decision/prompt-decisions.ts(+34 -2)📝
packages/server/src/services/lorebook/index.ts(+62 -1)📝
packages/server/src/services/prompt/assembler.ts(+5 -2)📝
packages/server/src/services/prompt/macro-context.ts(+29 -9)📝
packages/shared/src/utils/macro-engine.ts(+133 -3)➕
scripts/regressions/active-character-reference.regression.ts(+124 -0)➕
scripts/regressions/decision-until-while.regression.ts(+274 -0)➕
scripts/regressions/lorebook-include-macro.regression.ts(+281 -0)📄 Description
Linked issue
Closes #6924
Closes #6912
Closes #6922
One commit per issue.
Why this change
{{<character ID>}}stayed as raw text when that character was already in the chat. The docs say it becomes the character's name.sticky). You couldn't say "stay on until the fight ends".What changed
Character ID macros (#6924)
macro-context.tsandassembler.ts.{{include::ENTRY}}and{{include::BOOK::ENTRY}}(#6912)/macros.untilandwhilefor decision blocks (#6922){{#if decision:"A fight starts" until:"The fight ends"}}stays on after a yes until the second question gets a yes.while:"…"stays on while its question keeps getting a yes.sticky:N, a:and/:restrictor:or/:extendsuffix picks whether the condition cuts the time short or extends it. The defaults follow the issue's tables.cooldown:Napplies after the block turns off.until:"…"into the question itself; that's fixed too.Docs and changelog
docs/prompts/macros.md,docs/prompts/conditional-prompts.md(a new "Until and while" section) anddocs/lorebooks/entries.md.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What I ran (not a replacement for the checklist):
pnpm checkandpnpm regression:promptpass.active-character-reference: the name map was empty before the fix.lorebook-include-macro: covers the macro rules, the lorebook scan, preset sections, chat messages, and a real generate turn with an author's note.decision-until-while: covers every row of the issue's tables, cooldown, a missing answer, and a real 4-turn chat.decision-sidecar-runtime, also fails on untouched staging on this machine (a local-model disk check).pnpm check, the new regressions andpnpm regression:prompt.srcinstead ofdist. Other regressions, like #6950's, usedisttoo, and the runner builds shared first.{{include::}}, so it's marked with aponytail:note instead.To check by hand:
{{ID}}and check Peek Prompt shows their name.{{include::Some Entry}}, plus one that includes itself, and check Peek Prompt.{{#if decision:"A fight starts" until:"The fight ends"}}…{{/if}}over a few turns with a Decision model set up.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)The three docs pages above changed. Their translations go into the one
docs-i18nPR for this sweep.UI evidence (if applicable)
No layout changes; the macro reference just gains three entries.
Summary by CodeRabbit
untilandwhileconditions, with sticky behavior and cooldown timing.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.