[PR #3442] [MERGED] fix(conversation): suppress auto about-me block when preset places bios itself #5937

Closed
opened 2026-10-23 04:05:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3442
Author: @kolacheee
Created: 7/10/2026
Status: ✅ Merged
Merged: 7/10/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/3436-aboutme-macro-suppression


📝 Commits (4)

  • 1f1217b fix(conversation): suppress auto about-me block when preset places bios itself
  • f4d71b5 Merge branch 'staging' into fix/3436-aboutme-macro-suppression
  • a23c83e Preserve group About Me profiles with relocation macros
  • 59f5183 Merge remote-tracking branch 'origin/staging' into HEAD

📊 Changes

1 file changed (+18 additions, -2 deletions)

View changed files

📝 packages/server/src/routes/generate.routes.ts (+18 -2)

📄 Description

Linked issue

Closes #3436

Why this change

Every other conversation-mode relocation macro suppresses its automatic block when the preset places that content itself:

  • react rules — gated by !conversationContextMacroSlots.reactRules
  • memories — gated by !conversationContextMacroSlots.memories
  • context / commands / lorebook — placed via replaceConversationContextMacro

The participant about-me block was the exception: it was appended unconditionally (its only gate was the chat-level conversationAboutMeInject toggle). So a preset that hand-builds a participant-profiles section with {{char_about}} / {{persona_about}} produced the bios twice — the user's custom section plus the separate auto-inserted "about me" SYSTEM block.

What changed

packages/server/src/routes/generate.routes.ts:

  • Added an aboutMe key to ConversationContextMacroSlots, with detection aliases {{char_about}} / {{persona_about}}. It's a detection-only slot (no placement alias) — those field macros are already rendered by the shared macro engine's flat pass; the slot only records that the preset places the bios itself.
  • Gated the automatic about-me append with && !conversationContextMacroSlots.aboutMe, mirroring the reactRules / memories gating.

Result: when a preset references {{char_about}}/{{persona_about}}, the engine skips its own about-me block, so the content appears once. Presets that don't reference them are unaffected (auto block still inserts, subject to the existing conversationAboutMeInject toggle).

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Automated checks I ran locally (green):

  • pnpm --filter @marinara-engine/server lint (tsc -b ../shared && tsc --noEmit) — clean
  • pnpm regression:prompt — full prompt/macro regression suite passes

Still to verify manually in the app (please tick above once done):

  1. In a Conversation-mode preset, hand-build a participant-profiles section using {{char_about}} / {{persona_about}}, generate a reply, and confirm the assembled prompt contains the bios once (no separate auto "about me" SYSTEM block).
  2. In a preset that does not reference those macros, confirm the automatic about-me block still appears (and still respects the existing "inject about me" chat toggle).
  3. Group chat: confirm no regression in how multiple participants' bios appear.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

Macro-reference docs are tracked in #3437; no version bump here.

UI evidence (if applicable)

N/A (prompt-assembly logic; no UI surface changed).

Summary by CodeRabbit

  • Bug Fixes
    • Prevented duplicate “About Me” information from appearing in conversation prompts when a preset already includes biography details.
    • Improved compatibility with presets using character or persona biography macros.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3442 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 7/10/2026 **Status:** ✅ Merged **Merged:** 7/10/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3436-aboutme-macro-suppression` --- ### 📝 Commits (4) - [`1f1217b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1f1217b68018f491e709542f45a1477ff91c83be) fix(conversation): suppress auto about-me block when preset places bios itself - [`f4d71b5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f4d71b5d4becf78c818ce88091c827a5ca48f7ef) Merge branch 'staging' into fix/3436-aboutme-macro-suppression - [`a23c83e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a23c83e932bb72488cc1598eb6489af40d6f4b9b) Preserve group About Me profiles with relocation macros - [`59f5183`](https://github.com/Pasta-Devs/Marinara-Engine/commit/59f5183ccf381e48defa39db053f3531f8abec6a) Merge remote-tracking branch 'origin/staging' into HEAD ### 📊 Changes **1 file changed** (+18 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/generate.routes.ts` (+18 -2) </details> ### 📄 Description <!-- Target branch: `staging`. --> ## Linked issue Closes #3436 ## Why this change Every other conversation-mode relocation macro suppresses its automatic block when the preset places that content itself: - react rules — gated by `!conversationContextMacroSlots.reactRules` - memories — gated by `!conversationContextMacroSlots.memories` - context / commands / lorebook — placed via `replaceConversationContextMacro` The participant **about-me** block was the exception: it was appended **unconditionally** (its only gate was the chat-level `conversationAboutMeInject` toggle). So a preset that hand-builds a participant-profiles section with `{{char_about}}` / `{{persona_about}}` produced the bios **twice** — the user's custom section plus the separate auto-inserted "about me" SYSTEM block. ## What changed `packages/server/src/routes/generate.routes.ts`: - Added an `aboutMe` key to `ConversationContextMacroSlots`, with detection aliases `{{char_about}}` / `{{persona_about}}`. It's a **detection-only** slot (no placement alias) — those field macros are already rendered by the shared macro engine's flat pass; the slot only records that the preset places the bios itself. - Gated the automatic about-me append with `&& !conversationContextMacroSlots.aboutMe`, mirroring the `reactRules` / `memories` gating. Result: when a preset references `{{char_about}}`/`{{persona_about}}`, the engine skips its own about-me block, so the content appears once. Presets that don't reference them are unaffected (auto block still inserts, subject to the existing `conversationAboutMeInject` toggle). ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Automated checks I ran locally (green): - `pnpm --filter @marinara-engine/server lint` (`tsc -b ../shared && tsc --noEmit`) — clean - `pnpm regression:prompt` — full prompt/macro regression suite passes Still to verify manually in the app (please tick above once done): 1. In a Conversation-mode preset, hand-build a participant-profiles section using `{{char_about}}` / `{{persona_about}}`, generate a reply, and confirm the assembled prompt contains the bios **once** (no separate auto "about me" SYSTEM block). 2. In a preset that does **not** reference those macros, confirm the automatic about-me block still appears (and still respects the existing "inject about me" chat toggle). 3. Group chat: confirm no regression in how multiple participants' bios appear. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) Macro-reference docs are tracked in #3437; no version bump here. ## UI evidence (if applicable) N/A (prompt-assembly logic; no UI surface changed). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Prevented duplicate “About Me” information from appearing in conversation prompts when a preset already includes biography details. * Improved compatibility with presets using character or persona biography macros. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:05:22 +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#5937
No description provided.