[PR #95] [MERGED] fix(chat): Inject character first message on Quick Start Roleplay #4462

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/95
Author: @LukaTheHero
Created: 4/17/2026
Status: ✅ Merged
Merged: 4/17/2026
Merged by: @LukaTheHero

Base: main ← Head: fix/quick-start-roleplay-first-mes


📝 Commits (1)

  • eb4fe0f fix(chat): Inject character first message on Quick Start Roleplay

📊 Changes

2 files changed (+142 additions, -18 deletions)

View changed files

📝 packages/client/src/components/panels/BotBrowserPanel.tsx (+76 -9)
📝 packages/client/src/components/panels/CharactersPanel.tsx (+66 -9)

📄 Description

Summary

Right-clicking a character and choosing Quick Start Roleplay was creating the chat with the character attached but never seeding the character's first_mes greeting, so the new chat opened empty. The wizard's toggleCharacter flow handles this for the normal "add a character" path; the right-click shortcut bypassed it.

Fix

  • Capture first_mes + alternate_greetings at right-click time (alongside charId / charName).
  • In quickStartFromCharacter's createChat.onSuccess, when mode === "roleplay" and a first_mes exists:
    • Post it as the first assistant message on the new chat.
    • Post any alternate greetings as silent swipes on that message.
    • Invalidate chatKeys.messages(chat.id) so the chat surface picks them up.
  • Conversation mode is intentionally skipped — matches the existing wizard behavior (no auto-greeting for conversations).
  • Greeting injection failures are swallowed so they never block the chat from opening.

Applies to all three right-click surfaces:

  • Characters panel rows
  • Group member rows (inside an expanded group)
  • Browser panel imported-character rows

🔄 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/95 **Author:** [@LukaTheHero](https://github.com/LukaTheHero) **Created:** 4/17/2026 **Status:** ✅ Merged **Merged:** 4/17/2026 **Merged by:** [@LukaTheHero](https://github.com/LukaTheHero) **Base:** `main` ← **Head:** `fix/quick-start-roleplay-first-mes` --- ### 📝 Commits (1) - [`eb4fe0f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/eb4fe0f0810ddd8d56619006a86b504d7be9ed75) fix(chat): Inject character first message on Quick Start Roleplay ### 📊 Changes **2 files changed** (+142 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/panels/BotBrowserPanel.tsx` (+76 -9) 📝 `packages/client/src/components/panels/CharactersPanel.tsx` (+66 -9) </details> ### 📄 Description ## Summary Right-clicking a character and choosing **Quick Start Roleplay** was creating the chat with the character attached but never seeding the character's `first_mes` greeting, so the new chat opened empty. The wizard's `toggleCharacter` flow handles this for the normal "add a character" path; the right-click shortcut bypassed it. ## Fix - Capture `first_mes` + `alternate_greetings` at right-click time (alongside `charId` / `charName`). - In `quickStartFromCharacter`'s `createChat.onSuccess`, when `mode === "roleplay"` and a `first_mes` exists: - Post it as the first assistant message on the new chat. - Post any alternate greetings as silent swipes on that message. - Invalidate `chatKeys.messages(chat.id)` so the chat surface picks them up. - Conversation mode is intentionally skipped — matches the existing wizard behavior (no auto-greeting for conversations). - Greeting injection failures are swallowed so they never block the chat from opening. Applies to all three right-click surfaces: - Characters panel rows - Group member rows (inside an expanded group) - Browser panel imported-character rows --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:07: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#4462
No description provided.