[PR #7752] [MERGED] fix(roleplay): give illustrate commands NovelAI captions and respect the reference switch #7913

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7752
Author: @ylli-selmani
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @ylli-selmani

Base: staging ← Head: fix/illustrate-command-captions


📝 Commits (2)

  • 0ef89b4 fix(roleplay): give illustrate commands the NovelAI caption rules
  • 3ae6123 fix(roleplay): let illustrate commands follow the avatar reference switch

📊 Changes

5 files changed (+117 additions, -43 deletions)

View changed files

📝 e2e/roleplay-commands.e2e.ts (+9 -2)
📝 packages/server/src/routes/generate.routes.ts (+16 -5)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+10 -35)
📝 packages/server/src/services/generation/illustrator-manual-prompt-generation.ts (+45 -1)
📝 scripts/regressions/illustrator-character-prompts.regression.ts (+37 -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 #7751

Why this change

  • Before: an [illustrate: ...] command wrote its image prompt without the NovelAI character caption rules that the Illustration button gets. NovelAI never received per-character captions from commands, and Attach card appearance fell back to appending flat Name's Appearance: ... lines. Naming characters in the command also forced avatar references even with the chat's reference switch off.
  • After: commands get the same caption rules and appearance reference as the Illustration button, and the reference switch decides whether avatars are sent.

What changed

  • Slice 1, captions: the caption-plus-appearance builder from the Illustration button route moved into a shared buildManualIllustratorCharacterPromptInstruction helper (illustrator-manual-prompt-generation.ts). The button route and the command path both use it. The command path reads the instruction the route already resolves into agent memory.
  • Slice 2, references: removed the command.characters override from useAvatarRefs in generate.routes.ts. Named characters still narrow whose references are sent when the switch is on. This was forced on purpose in #5998, so it is a behaviour change, picked to keep one switch meaning the same thing everywhere.
  • Tests: illustrator-character-prompts.regression.ts covers the helper and pins the command path. The roleplay commands e2e now expects no avatar with the switch off and the named avatar with it on.

Validation

  • pnpm check passes locally (server typecheck, prettier, related regressions)
  • 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

  • illustrator-character-prompts, illustrator-reference-scope, roleplay-commands, prompt and open-issues regressions pass. The new check fails on unmodified staging.
  • The Roleplay commands require attached agents… e2e passes on desktop-chromium and mobile-chromium. Webkit can't launch in this environment.
  • Still needed: a live NovelAI V5 command to confirm characterPrompts come back and no references are sent with the switch off.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) 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)

No UI changes.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements
    • Illustrator commands now include named characters’ portraits only when avatar references are enabled in settings.
    • Manual Illustrator prompts can include character and persona appearance references when the relevant setting is enabled. Image-appearance overrides take precedence over card or persona appearance.

🔄 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/7752 **Author:** [@ylli-selmani](https://github.com/ylli-selmani) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@ylli-selmani](https://github.com/ylli-selmani) **Base:** `staging` ← **Head:** `fix/illustrate-command-captions` --- ### 📝 Commits (2) - [`0ef89b4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0ef89b4375094891c5e43c819e3ec8431ede7798) fix(roleplay): give illustrate commands the NovelAI caption rules - [`3ae6123`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3ae6123c61b467f671d486523864cfb18e0cc002) fix(roleplay): let illustrate commands follow the avatar reference switch ### 📊 Changes **5 files changed** (+117 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `e2e/roleplay-commands.e2e.ts` (+9 -2) 📝 `packages/server/src/routes/generate.routes.ts` (+16 -5) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+10 -35) 📝 `packages/server/src/services/generation/illustrator-manual-prompt-generation.ts` (+45 -1) 📝 `scripts/regressions/illustrator-character-prompts.regression.ts` (+37 -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`. ## Linked issue Closes #7751 ## Why this change - Before: an `[illustrate: ...]` command wrote its image prompt without the NovelAI character caption rules that the Illustration button gets. NovelAI never received per-character captions from commands, and Attach card appearance fell back to appending flat `Name's Appearance: ...` lines. Naming characters in the command also forced avatar references even with the chat's reference switch off. - After: commands get the same caption rules and appearance reference as the Illustration button, and the reference switch decides whether avatars are sent. ## What changed - **Slice 1, captions:** the caption-plus-appearance builder from the Illustration button route moved into a shared `buildManualIllustratorCharacterPromptInstruction` helper (`illustrator-manual-prompt-generation.ts`). The button route and the command path both use it. The command path reads the instruction the route already resolves into agent memory. - **Slice 2, references:** removed the `command.characters` override from `useAvatarRefs` in `generate.routes.ts`. Named characters still narrow whose references are sent when the switch is on. This was forced on purpose in #5998, so it is a behaviour change, picked to keep one switch meaning the same thing everywhere. - Tests: `illustrator-character-prompts.regression.ts` covers the helper and pins the command path. The roleplay commands e2e now expects no avatar with the switch off and the named avatar with it on. ## Validation - [x] `pnpm check` passes locally (server typecheck, prettier, related regressions) - [ ] 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) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `illustrator-character-prompts`, `illustrator-reference-scope`, `roleplay-commands`, `prompt` and `open-issues` regressions pass. The new check fails on unmodified staging. - The `Roleplay commands require attached agents…` e2e passes on desktop-chromium and mobile-chromium. Webkit can't launch in this environment. - Still needed: a live NovelAI V5 command to confirm `characterPrompts` come back and no references are sent with the switch off. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) 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) No UI changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Illustrator commands now include named characters’ portraits only when avatar references are enabled in settings. * Manual Illustrator prompts can include character and persona appearance references when the relevant setting is enabled. Image-appearance overrides take precedence over card or persona appearance. <!-- 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:08:46 +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#7913
No description provided.