[PR #3228] [MERGED] [codex] Fix Mari parser flags and Game dynamic image prompts #5853

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

📋 Pull Request Information

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

Base: staging ← Head: codex/issues-3222-3225


📝 Commits (3)

  • 617a385 Fix Mari boolean flag parsing
  • a0d2ce3 Add dynamic Game Mode image prompts
  • 9c9d0a5 Address game asset prompt review feedback

📊 Changes

9 files changed (+554 additions, -90 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+12 -0)
📝 packages/server/src/routes/game.routes.ts (+332 -58)
📝 packages/server/src/services/game/game-asset-generation.ts (+112 -26)
📝 packages/server/src/services/mari-db/mari-db.service.ts (+25 -1)
📝 packages/server/src/services/prompt-overrides/index.ts (+2 -0)
📝 packages/server/src/services/prompt-overrides/registry.ts (+4 -0)
📝 packages/server/src/services/prompt-overrides/registry/game-assets.ts (+63 -5)
📝 packages/shared/src/types/chat.ts (+2 -0)

📄 Description

Summary

  • Fixes Mari CLI boolean flag parsing so flags such as --tail, --raw, --patch, --strict, and --staged no longer consume positional arguments.
  • Adds an optional Game Illustrator setting, Dynamic LLM Prompt Generation for GM Mode Assets, for NPC portraits, location backgrounds, and key-moment scene illustrations.
  • Registers game.imagePromptDirector so the dynamic rewrite prompt is editable, applies it to prompt previews and final generation, and falls back to deterministic prompts if the LLM rewrite fails.
  • Updates the v2.1.0 changelog.

Fixes #3222.
Fixes #3225.

Validation

  • pnpm --filter @marinara-engine/server lint
  • pnpm --filter @marinara-engine/client lint (passes with existing ConversationView.tsx exhaustive-deps warning)
  • pnpm regression:prompt
  • pnpm check (passes with existing client lint warning and Vite large-chunk warning)

Manual Verification Needed

  • Manually verify Game Mode Chat Settings shows the new Dynamic LLM Prompt Generation toggle under Illustrator.
  • Manually verify prompt review previews use the rewritten prompt when the toggle is on.
  • Manually verify generated NPC portraits, backgrounds, and key-moment illustrations fall back to old prompts if the prompt-model call fails.

Summary by CodeRabbit

  • New Features

    • Added an optional toggle for dynamic prompt generation for game assets, letting generated portraits, backgrounds, and illustrations be rewritten before image creation.
    • Expanded game asset prompt handling so image requests can use more context-aware prompts when enabled.
  • Bug Fixes

    • Fixed CLI parsing so common boolean flags no longer consume the following positional argument, improving command reliability.

🔄 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/3228 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/5/2026 **Status:** ✅ Merged **Merged:** 7/5/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/issues-3222-3225` --- ### 📝 Commits (3) - [`617a385`](https://github.com/Pasta-Devs/Marinara-Engine/commit/617a38574fc7dfcd8fbde7833569d71cbd8adaad) Fix Mari boolean flag parsing - [`a0d2ce3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a0d2ce3da3ebbdab561acc4d8c31c8fd39ad7499) Add dynamic Game Mode image prompts - [`9c9d0a5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9c9d0a5b6970b2818377f5bfcc3c84b8131aa34c) Address game asset prompt review feedback ### 📊 Changes **9 files changed** (+554 additions, -90 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+12 -0) 📝 `packages/server/src/routes/game.routes.ts` (+332 -58) 📝 `packages/server/src/services/game/game-asset-generation.ts` (+112 -26) 📝 `packages/server/src/services/mari-db/mari-db.service.ts` (+25 -1) 📝 `packages/server/src/services/prompt-overrides/index.ts` (+2 -0) 📝 `packages/server/src/services/prompt-overrides/registry.ts` (+4 -0) 📝 `packages/server/src/services/prompt-overrides/registry/game-assets.ts` (+63 -5) 📝 `packages/shared/src/types/chat.ts` (+2 -0) </details> ### 📄 Description ## Summary - Fixes Mari CLI boolean flag parsing so flags such as `--tail`, `--raw`, `--patch`, `--strict`, and `--staged` no longer consume positional arguments. - Adds an optional Game Illustrator setting, **Dynamic LLM Prompt Generation for GM Mode Assets**, for NPC portraits, location backgrounds, and key-moment scene illustrations. - Registers `game.imagePromptDirector` so the dynamic rewrite prompt is editable, applies it to prompt previews and final generation, and falls back to deterministic prompts if the LLM rewrite fails. - Updates the v2.1.0 changelog. Fixes #3222. Fixes #3225. ## Validation - `pnpm --filter @marinara-engine/server lint` - `pnpm --filter @marinara-engine/client lint` (passes with existing `ConversationView.tsx` exhaustive-deps warning) - `pnpm regression:prompt` - `pnpm check` (passes with existing client lint warning and Vite large-chunk warning) ## Manual Verification Needed - Manually verify Game Mode Chat Settings shows the new Dynamic LLM Prompt Generation toggle under Illustrator. - Manually verify prompt review previews use the rewritten prompt when the toggle is on. - Manually verify generated NPC portraits, backgrounds, and key-moment illustrations fall back to old prompts if the prompt-model call fails. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an optional toggle for dynamic prompt generation for game assets, letting generated portraits, backgrounds, and illustrations be rewritten before image creation. * Expanded game asset prompt handling so image requests can use more context-aware prompts when enabled. * **Bug Fixes** * Fixed CLI parsing so common boolean flags no longer consume the following positional argument, improving command reliability. <!-- 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-22 04:20:11 +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#5853
No description provided.