mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3380] [Feature]: Way to exclude a persona/character field from auto-insertion without rendering it in the prompt #1829
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#1829
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/3380
Originally assigned to: @SpicyMarinara on GitHub.
What's being requested
A way to tell the engine "do not auto-add this persona/character field" without having to render it in the system prompt. Today, the only way to stop a field from being auto-inserted is to put its macro in the prompt so it appears in the final output — there's no way to say "don't auto-add it and don't show it," and no way to exclude a single field while letting the rest auto-add.
The user's attempted workaround (and why it fails)
They tried referencing the fields inside an always-false conditional, hoping the "using the macro suppresses the auto-insert" behavior would kick in without rendering anything:
It doesn't work: whether the auto-insert is suppressed is decided by whether the fields appear in the final, resolved prompt — not by whether the macros are present in the template. The
{{#if}}is false, so the fields never reach the output, so the detector treats them as "missing" and auto-adds the whole block anyway.Why (root cause — shared with the duplication bug #3377)
The identity auto-insert (
injectIdentityFallbackMessages) decides whether to inject by scanning the resolved prompt text for the info —hasProfileBlock(packages/server/src/services/generation/character-prompt-context.ts:123-130) overallContent = args.messages.map(m => m.content).join("\n"). Because it's output-based, it cannot distinguish "the author deliberately excluded this" from "the author forgot to include it." It's also entity-level (all-or-nothing per persona/character), so there's no per-field control.Suggested approach
Express suppression from author intent in the template, not from the resolved output — the same template-based / deterministic-flag direction already recommended for the #3377 duplication fix:
{{#if}}branch), treat that field as "handled" → suppress its auto-add whether or not it renders. This makes the user's false-conditional trick work and delivers exclude-without-render.{{backstory}}) can be excluded while the rest still auto-add.{{exclude:backstory}}/{{persona:none}}, or per-field "auto-include" toggles in the persona/character editor.Note: implementing #3377's fix via template-based detection would grant the entity-level version of this for free; the extra ask here is field-level granularity and/or an explicit opt-out affordance. Related: #3377 (identity duplication — same detection root cause), #3379 (macros for other auto-inserted conversation contexts).
AI-investigated against the current tree (v2.0.9); the output-based detection (
hasProfileBlockscans resolved messages) confirmed, which is why an always-false{{#if}}can't suppress the auto-add. Filed as an enhancement per the reporter's request.@SpicyMarinara commented on GitHub (Jul 8, 2026):
Addressed in #3388 and merged to staging.