[GH-ISSUE #3436] [Issue]: {{char_about}}/{{persona_about}} don't suppress the auto-inserted participant-profiles block (duplicated in prompt) #1859

Closed
opened 2026-10-21 05:43:18 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Jul 10, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3436

Originally assigned to: @kolacheee on GitHub.

Summary

In Conversation mode, placing the participant "about me" bios into your own preset with {{char_about}}/{{persona_about}} does not suppress the automatically-inserted participant-profiles block, so the prompt ends up with the content twice — the user's custom section and the auto-inserted one.

Expected behavior

Consistent with the other relocation macros ({{reactRules}}, {{memories}}, {{context}}, {{commands}}, {{lorebook}}), which suppress their automatic block when used: when a preset places the about-me content itself (via {{char_about}}/{{persona_about}}, or a dedicated {{participantProfiles}} macro), the engine should skip its own auto-inserted participant-profiles block.

Actual behavior

The prompt contains both:

  • the user's own <participant_profiles> section built with {{char_about}}/{{persona_about}}, and
  • a separate auto-inserted SYSTEM block ("Participant profiles — each person's 'about me' …") listing the same bios.

(See screenshot: the two sections carry the same about-me content.)

Steps to reproduce

  1. In a Conversation-mode preset, hand-build a participant-profiles section using {{char_about}} / {{persona_about}}.
  2. Generate a reply.
  3. The assembled prompt contains the participant profiles twice — your version plus the auto block.

Environment

  • Marinara Engine version: 2.1.x (staging)
  • Install type: installer
  • OS + version: Windows 11
  • Browser or app shell: Chrome

Logs, screenshots, or video

Screenshot shows a user-authored PARTICIPANT_PROFILES section and a separate auto SYSTEM section both listing the same about-me bios.

Additional context

Root cause (verified on staging). The macro-aware suppression is driven by ConversationContextMacroSlots, whose key union is only "context" | "commands" | "reactRules" | "memories" | "lorebook" (packages/server/src/routes/generate.routes.ts:440, aliases at :451-457, detection resolveConversationContextMacroSlots at :464). There is no slot for participant profiles / about-me, and no {{participantProfiles}} macro exists.

Every other auto block is suppressed when its macro is used:

  • react rules: if (!conversationContextMacroSlots.reactRules) { conversationSystemPrompt += … } (generate.routes.ts:1892)
  • memories: if (… && !conversationContextMacroSlots.memories) { … } (:1955)
  • context/commands/lorebook: placed via replaceConversationContextMacro.

But the about-me block is appended unconditionally:

if (convoProfileBlocks.aboutMeBlock) {
  conversationSystemPrompt += "\n\n" + convoProfileBlocks.aboutMeBlock;   // generate.routes.ts:1969-1971
}

Its only gate is the chat-level toggle autoInjectAbout = chatMeta.conversationAboutMeInject !== false (:1750) — not macro-aware. Meanwhile {{char_about}}/{{persona_about}} resolve independently in the user's template (macro-engine.ts:1298-1299). So a hand-built about-me section is duplicated by the auto block. (The aboutMeBlock text itself is built in packages/server/src/services/conversation/conversation-profiles.ts:120-138.)

Not a bug (scoping): the custom-emoji react rules block is correctly suppressed via {{reactRules}} (:1892); in the reporter's screenshot it appears in the auto SYSTEM block only because they did not place {{reactRules}} in their custom section — it is present once, not duplicated.

Suggested fix: make the about-me / participant-profiles auto block macro-aware, mirroring the reactRules/memories pattern — add a participantProfiles key (aliases e.g. ["participantProfiles","char_about","persona_about"]) to ConversationContextMacroKey + the alias table, then either gate the append at :1969 with && !conversationContextMacroSlots.participantProfiles (and optionally support a {{participantProfiles}} placement macro), or minimally skip the append when the resolved template already contains {{char_about}}/{{persona_about}}.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Jul 10, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3436 Originally assigned to: @kolacheee on GitHub. ## Summary In Conversation mode, placing the participant "about me" bios into your own preset with `{{char_about}}`/`{{persona_about}}` does **not** suppress the automatically-inserted participant-profiles block, so the prompt ends up with the content **twice** — the user's custom section and the auto-inserted one. ## Expected behavior Consistent with the other relocation macros (`{{reactRules}}`, `{{memories}}`, `{{context}}`, `{{commands}}`, `{{lorebook}}`), which suppress their automatic block when used: when a preset places the about-me content itself (via `{{char_about}}`/`{{persona_about}}`, or a dedicated `{{participantProfiles}}` macro), the engine should **skip** its own auto-inserted participant-profiles block. ## Actual behavior The prompt contains both: - the user's own `<participant_profiles>` section built with `{{char_about}}`/`{{persona_about}}`, and - a separate auto-inserted SYSTEM block ("Participant profiles — each person's 'about me' …") listing the same bios. (See screenshot: the two sections carry the same about-me content.) ## Steps to reproduce 1. In a Conversation-mode preset, hand-build a participant-profiles section using `{{char_about}}` / `{{persona_about}}`. 2. Generate a reply. 3. The assembled prompt contains the participant profiles twice — your version plus the auto block. ## Environment - Marinara Engine version: 2.1.x (staging) - Install type: installer - OS + version: Windows 11 - Browser or app shell: Chrome ## Logs, screenshots, or video Screenshot shows a user-authored `PARTICIPANT_PROFILES` section and a separate auto `SYSTEM` section both listing the same about-me bios. ## Additional context **Root cause (verified on staging).** The macro-aware suppression is driven by `ConversationContextMacroSlots`, whose key union is only `"context" | "commands" | "reactRules" | "memories" | "lorebook"` (`packages/server/src/routes/generate.routes.ts:440`, aliases at `:451-457`, detection `resolveConversationContextMacroSlots` at `:464`). **There is no slot for participant profiles / about-me, and no `{{participantProfiles}}` macro exists.** Every other auto block *is* suppressed when its macro is used: - react rules: `if (!conversationContextMacroSlots.reactRules) { conversationSystemPrompt += … }` (`generate.routes.ts:1892`) - memories: `if (… && !conversationContextMacroSlots.memories) { … }` (`:1955`) - context/commands/lorebook: placed via `replaceConversationContextMacro`. But the about-me block is appended **unconditionally**: ```js if (convoProfileBlocks.aboutMeBlock) { conversationSystemPrompt += "\n\n" + convoProfileBlocks.aboutMeBlock; // generate.routes.ts:1969-1971 } ``` Its only gate is the chat-level toggle `autoInjectAbout = chatMeta.conversationAboutMeInject !== false` (`:1750`) — **not** macro-aware. Meanwhile `{{char_about}}`/`{{persona_about}}` resolve independently in the user's template (`macro-engine.ts:1298-1299`). So a hand-built about-me section is duplicated by the auto block. (The `aboutMeBlock` text itself is built in `packages/server/src/services/conversation/conversation-profiles.ts:120-138`.) **Not a bug (scoping):** the custom-emoji **react** rules block *is* correctly suppressed via `{{reactRules}}` (`:1892`); in the reporter's screenshot it appears in the auto SYSTEM block only because they did not place `{{reactRules}}` in their custom section — it is present once, not duplicated. Suggested fix: make the about-me / participant-profiles auto block macro-aware, mirroring the `reactRules`/`memories` pattern — add a `participantProfiles` key (aliases e.g. `["participantProfiles","char_about","persona_about"]`) to `ConversationContextMacroKey` + the alias table, then either gate the append at `:1969` with `&& !conversationContextMacroSlots.participantProfiles` (and optionally support a `{{participantProfiles}}` placement macro), or minimally skip the append when the resolved template already contains `{{char_about}}`/`{{persona_about}}`. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:43:18 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1859
No description provided.