[PR #7393] [MERGED] fix(prompt): keep non-Latin names in prompt tags #7715

Closed
opened 2026-10-24 04:06:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix/unicode-prompt-wrapper-tags


📝 Commits (4)

  • 9ae4f50 fix(prompt): keep non-Latin names in prompt tags
  • 5c0cc45 fix(prompt): drop leading combining marks from name tags
  • c3301c5 Merge branch 'staging' into fix/unicode-prompt-wrapper-tags
  • 640585e Merge branch 'staging' into fix/unicode-prompt-wrapper-tags

📊 Changes

7 files changed (+145 additions, -7 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 packages/client/src/components/chat/PeekPromptModal.tsx (+2 -2)
📝 packages/server/src/services/generation/prompt-message-scope.ts (+3 -1)
📝 packages/server/src/services/generation/runtime-agent-sections.ts (+2 -2)
📝 packages/server/src/services/prompt/format-engine.ts (+2 -1)
📝 packages/shared/src/utils/xml-wrapper.ts (+5 -1)
📝 scripts/regressions/prompt.regression.ts (+129 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7394

Why this change

홍길동 turned into an empty <> tag and Amélie into <amlie>. So the model context might be mixed because of this problem.

What changed

Tags and Markdown headings now keep letters from any script, minus the invisible marks emoji leave behind.

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

I made 홍길동 character and check prompt with peek feature. It is now correctly generated as <홍길동> ... </홍길동> not <> ... </>

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Summary by CodeRabbit

  • Bug Fixes
    • Prompt tags and Peek Prompt now better recognize non-Latin and accented names and section labels.
    • Markdown headings and XML wrappers preserve names across a wider range of writing systems, including combining marks, numbers, and varied whitespace.
    • Fixed individual group-chat prompts where symbols or emoji in a character’s name could expose another character’s card. Prompts now retain the responding character’s card.

🔄 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/7393 **Author:** [@chungchandev](https://github.com/chungchandev) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/unicode-prompt-wrapper-tags` --- ### 📝 Commits (4) - [`9ae4f50`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9ae4f50baffad73dca23972216668113f938154a) fix(prompt): keep non-Latin names in prompt tags - [`5c0cc45`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5c0cc45b931fa2020c52152b4cb99afcba5d2f29) fix(prompt): drop leading combining marks from name tags - [`c3301c5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c3301c58ab4361601e612e807fc4171b49ba7f96) Merge branch 'staging' into fix/unicode-prompt-wrapper-tags - [`640585e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/640585e9516e2dc564a71398201d18d7c4fe4c5f) Merge branch 'staging' into fix/unicode-prompt-wrapper-tags ### 📊 Changes **7 files changed** (+145 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `packages/client/src/components/chat/PeekPromptModal.tsx` (+2 -2) 📝 `packages/server/src/services/generation/prompt-message-scope.ts` (+3 -1) 📝 `packages/server/src/services/generation/runtime-agent-sections.ts` (+2 -2) 📝 `packages/server/src/services/prompt/format-engine.ts` (+2 -1) 📝 `packages/shared/src/utils/xml-wrapper.ts` (+5 -1) 📝 `scripts/regressions/prompt.regression.ts` (+129 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #7394 ## Why this change <!-- What user problem, bug, or goal does this solve? --> `홍길동` turned into an empty `<>` tag and `Amélie` into `<amlie>`. So the model context might be mixed because of this problem. ## What changed <!-- List the key changes in this PR --> Tags and Markdown headings now keep letters from any script, minus the invisible marks emoji leave behind. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> I made `홍길동` character and check prompt with peek feature. It is now correctly generated as `<홍길동> ... </홍길동>` not `<> ... </>` ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <!-- Add before/after screenshots or recordings for UI changes --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Prompt tags and Peek Prompt now better recognize non-Latin and accented names and section labels. * Markdown headings and XML wrappers preserve names across a wider range of writing systems, including combining marks, numbers, and varied whitespace. * Fixed individual group-chat prompts where symbols or emoji in a character’s name could expose another character’s card. Prompts now retain the responding character’s card. <!-- 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-24 04:06:47 +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#7715
No description provided.