mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6967] [MERGED] fix: character ID names in every chat mode, and no raw tool calls in streamed replies #7409
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#7409
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/6967
Author: @SpicyMarinara
Created: 10/2/2026
Status: ✅ Merged
Merged: 10/2/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/charid-modes-toolcall-stream📝 Commits (10+)
a938678fix(macros): name character ID macros in Conversation and Game chats94fc5b3fix(generate): drop streamed text tool calls from the replyafd69efdocs(macros): say where character ID cards are addedf9f96ecMerge remote-tracking branch 'origin/staging' into fix/charid-modes-toolcall-stream2ec0b0fMerge remote-tracking branch 'origin/staging' into fix/charid-modes-toolcall-streamd6be6aedocs(changelog): drop repeated entries7da395dMerge remote-tracking branch 'origin/staging' into fix/charid-modes-toolcall-stream822edb1Merge remote-tracking branch 'origin/staging' into fix/charid-modes-toolcall-streamf524dc4fix(macros): name every referenced character, not just eight8ca42f6fix(macros): name every referenced character in Roleplay too📊 Changes
9 files changed (+224 additions, -14 deletions)
View changed files
📝
CHANGELOG.md(+4 -0)📝
docs/prompts/macros.md(+1 -1)📝
packages/server/src/routes/chats.routes.ts(+1 -0)📝
packages/server/src/routes/generate.routes.ts(+8 -0)📝
packages/server/src/routes/generate/dry-run-route.ts(+7 -0)📝
packages/server/src/services/prompt/macro-context.ts(+35 -12)➕
scripts/regressions/character-id-macro-modes.regression.ts(+154 -0)📝
scripts/regressions/gm-skill-check-resolution.regression.ts(+5 -1)📝
scripts/regressions/roleplay-function-calling.regression.ts(+9 -0)📄 Description
Linked issue
Closes #6956
Closes #6951
One commit per issue, plus a small docs fix.
Why this change
{{<character ID>}}became a name only in Roleplay chats that use a prompt preset. Only that path built the ID-to-name map, so in Conversation and Game chats the macro stayed as raw text.<tool_call>{…}</tool_call>at the top of the saved reply, even though the call ran. The text was streamed and added to the reply before the call was recognized, and nothing removed it afterwards.What changed
Character ID names everywhere (#6956)
buildReferencedCharacterContexthelper gets anamesOnlyoption that skips card text and lorebook scans.docs/prompts/macros.mdnow says so.No more raw tool call text (#6951)
content_replaceevent, so the raw call disappears from the screen too.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What I ran (not a replacement for the checklist):
Checks:
pnpm check,pnpm regression:promptandpnpm smoke:ui(7/7) pass. I re-ranpnpm checkand the four related regressions after merging the latest staging.New
character-id-macro-modes.regression.ts: checks Peek Prompt, the dry run and the sent prompt in Conversation and Game. It fails before the fix, and also with either half of the fix undone.Extended
roleplay-function-calling.regression.ts: the saved reply, and the text after replaying the stream the way the client does, must both be exactly "The die settles.". Before the fix both started with the raw<tool_call>.gm-skill-check-resolution.regression.ts: it looked for the firstcontent_replaceingenerate.routes.ts, which is now the new one, so it's pointed at the final one again. It still guards the same thing.Local CodeRabbit: 0 findings.
To check by hand:
{{ID}}and check Peek Prompt shows their name.<tool_call>text and streaming on, have a character roll dice. The reply should show only the narration, with no raw tag, both while streaming and after reload.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/prompts/macros.mdhas one corrected paragraph. The translated packs will follow in adocs-i18nPR with #6966's doc change.UI evidence (if applicable)
Server-side changes; the client reuses its existing content-replace handling.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.