mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3378] [Issue]: Command list is wrapped in a literal <commands> XML tag even when section wrapping is set to None #1826
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#1826
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?
Originally created by @kolacheee on GitHub (Jul 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3378
Originally assigned to: @SpicyMarinara on GitHub.
What's wrong
When "prompt section wrapping" is set to None, every context block renders without XML tags — except the character-command list, which is still hard-wrapped in a literal
<commands>…</commands>element. So with None you get bare, unwrapped status/memory/context blocks plus one incongruously XML-tagged command block.How to reproduce (try it yourself)
You'll see: the command reminder is still wrapped in
<commands>…</commands>, while the status/context and memory blocks render unwrapped.Expected: with None selected, the command list renders without the XML tags, like every other block.
Where it is
packages/server/src/services/generation/conversation-command-runtime.ts— the command-reminder builder hardcodes the tags:commandLinesstarts with a literal`<commands>`(line 204), and the matching</commands>is appended near line 321. The builder never receiveswrapFormatand never callswrapContent, so it ignores the None setting that every sibling block honors.What's happening
Unlike the status/context and memory blocks — which go through
wrapContentand therefore respectwrapFormat="none"— the command list literally string-concatenates the<commands>open/close tags.Suggested fix
Thread
wrapFormatinto the command-reminder builder and wrap the body viawrapContent(body, "commands", wrapFormat)instead of hardcoding the tags, so None strips them and xml/markdown stay consistent with the rest of the prompt. (Reporter flagged this in passing while requesting relocate/suppress macros — filed as its own bug; see the related enhancement.)AI-investigated against the current tree (v2.0.9); the hardcoded opening tag at line 204 read and confirmed. Please verify before fixing.
@SpicyMarinara commented on GitHub (Jul 8, 2026):
Addressed in #3388 and merged to staging.