[PR #3293] [MERGED] [codex] fix /as posting and NPC portrait prompts #5867

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

📋 Pull Request Information

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

Base: staging ← Head: codex/fix-as-command-npc-portraits


📝 Commits (4)

  • 06100fa fix roleplay as command and npc portrait prompts
  • 90651ef respect locked tracker rows in AI updates
  • 9f84e0c Merge remote-tracking branch 'origin/staging' into codex/fix-as-command-npc-portraits
  • adf63c3 address npc description source review

📊 Changes

8 files changed (+231 additions, -29 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 packages/client/src/components/chat/ChatInput.tsx (+4 -1)
📝 packages/client/src/components/chat/ConversationInput.tsx (+9 -2)
📝 packages/client/src/components/game/GameSurface.tsx (+57 -2)
📝 packages/client/src/lib/slash-commands.ts (+148 -17)
📝 packages/server/src/routes/game.routes.ts (+4 -2)
📝 packages/shared/src/types/game.ts (+1 -1)
📝 packages/shared/src/utils/tracker-field-locks.ts (+5 -4)

📄 Description

Summary

Fixes two maintainer-reported behaviors:

  • Roleplay /as Character "message" now posts the exact message as that character, while bare /as Character keeps the existing generated-response shortcut.
  • Game Mode NPC portrait generation now preserves GM-created initial-world NPC profile descriptions as canonical portrait guidance instead of letting weaker tracker or narration snippets override them.

Why

/as was only routing through a model-generation instruction ([Respond as Character]), so it could not post an exact authored line as a character. Game Mode portrait candidates also merged NPC descriptions with a first-non-empty rule, which meant setup-generated model descriptions could be shadowed before portrait prompts were built.

Validation

  • pnpm check

Manual Verification Needed

  • Manually verify /as Dottore "Hey there" in Roleplay posts one assistant message attributed to Dottore.
  • Manually verify bare /as Dottore still triggers generated response behavior.
  • Manually verify Game Mode NPC portrait prompt review/generation includes the GM-created initial-world NPC description for NPCs that have one.

No linked issue; maintainer-requested follow-up from chat.

Summary by CodeRabbit

  • New Features

    • Slash commands can now post an explicit quoted message for a character, and chat auto-scrolls after command-generated messages.
  • Bug Fixes

    • /as now sends the exact message provided when used with quoted text.
    • Locked fields in trackers, quests, inventory, and character merges can no longer be bypassed by renaming or replacing rows.
    • NPC portrait guidance now prioritizes the most reliable profile description and labels canonical profile text more clearly.

🔄 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/3293 **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/fix-as-command-npc-portraits` --- ### 📝 Commits (4) - [`06100fa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/06100faf47bc3dfbb13a2e9ed3d9c1855ba4a2ec) fix roleplay as command and npc portrait prompts - [`90651ef`](https://github.com/Pasta-Devs/Marinara-Engine/commit/90651ef3800faabd3d6794eb107a337cf7decbf3) respect locked tracker rows in AI updates - [`9f84e0c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9f84e0c9410c6bd26830ef324780b9d51c27fb64) Merge remote-tracking branch 'origin/staging' into codex/fix-as-command-npc-portraits - [`adf63c3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/adf63c370d6bf5a6cb624724dc8fa2dc2119db5d) address npc description source review ### 📊 Changes **8 files changed** (+231 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+4 -1) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+9 -2) 📝 `packages/client/src/components/game/GameSurface.tsx` (+57 -2) 📝 `packages/client/src/lib/slash-commands.ts` (+148 -17) 📝 `packages/server/src/routes/game.routes.ts` (+4 -2) 📝 `packages/shared/src/types/game.ts` (+1 -1) 📝 `packages/shared/src/utils/tracker-field-locks.ts` (+5 -4) </details> ### 📄 Description ## Summary Fixes two maintainer-reported behaviors: - Roleplay `/as Character "message"` now posts the exact message as that character, while bare `/as Character` keeps the existing generated-response shortcut. - Game Mode NPC portrait generation now preserves GM-created initial-world NPC profile descriptions as canonical portrait guidance instead of letting weaker tracker or narration snippets override them. ## Why `/as` was only routing through a model-generation instruction (`[Respond as Character]`), so it could not post an exact authored line as a character. Game Mode portrait candidates also merged NPC descriptions with a first-non-empty rule, which meant setup-generated model descriptions could be shadowed before portrait prompts were built. ## Validation - `pnpm check` ## Manual Verification Needed - Manually verify `/as Dottore "Hey there"` in Roleplay posts one assistant message attributed to Dottore. - Manually verify bare `/as Dottore` still triggers generated response behavior. - Manually verify Game Mode NPC portrait prompt review/generation includes the GM-created initial-world NPC description for NPCs that have one. No linked issue; maintainer-requested follow-up from chat. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Slash commands can now post an explicit quoted message for a character, and chat auto-scrolls after command-generated messages. * **Bug Fixes** * `/as` now sends the exact message provided when used with quoted text. * Locked fields in trackers, quests, inventory, and character merges can no longer be bypassed by renaming or replacing rows. * NPC portrait guidance now prioritizes the most reliable profile description and labels canonical profile text more clearly. <!-- 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:20 +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#5867
No description provided.