[PR #6055] [MERGED] feat(chat): add /send command for persona messages without generation #7040

Closed
opened 2026-10-23 04:15:58 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6055
Author: @Promansis
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/11/2026
Merged by: @Promansis

Base: staging ← Head: feat(chat)/send-persona-message


📝 Commits (2)

  • 0b089a5 feat(chat): add /send command for persona messages without generation (#6050)
  • 54ee83f Merge branch 'staging' into feat(chat)/send-persona-message

📊 Changes

5 files changed (+48 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/chats/guided-and-impersonate.md (+1 -1)
📝 docs/chats/slash-commands.md (+1 -0)
📝 packages/client/src/lib/slash-commands.ts (+12 -0)
📝 scripts/regressions/conversation-game-slash.regression.ts (+33 -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 #6050

Why this change

Users need a way to insert intentional persona story beats or prompt setups into the chat history without immediately triggering an LLM generation. This allows subsequent commands like /guided <direction> or /as <character> to generate in response to the newly placed persona message while maintaining natural message order.

What changed

  • Added /send <message> slash command in packages/client/src/lib/slash-commands.ts (local: true), stripping single wrapping quotes when supplied and invoking ctx.createMessage({ role: "user", content, characterId: null }) without calling ctx.generate().
  • Added documentation for /send in docs/chats/slash-commands.md and referenced it under Quick Replies' Post Only action in docs/chats/guided-and-impersonate.md.
  • Added unreleased entry in CHANGELOG.md referencing issue #6050.
  • Added regression tests in scripts/regressions/conversation-game-slash.regression.ts validating /send matching, empty usage handling, user-role message creation, and verifying zero LLM generation calls.

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

  • Manually verify typing /send Hello world in a Roleplay and Conversation chat creates a persona user message without triggering generation.
  • Manually verify typing /send without arguments returns the usage hint.
  • Manually verify follow-up with /guided steers the subsequent reply referencing the sent persona message.

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)

N/A

Summary by CodeRabbit

  • New Features

    • Added the /send <message> slash command.
    • Posts messages as the active persona without triggering an AI-generated response.
    • Supports messages wrapped in a single pair of quotes.
    • Shows usage guidance when no message is provided.
  • Documentation

    • Added /send to the chat and message command reference.
    • Documented it as an alternative to the “Post only” quick reply action.

🔄 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/6055 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/11/2026 **Status:** ✅ Merged **Merged:** 9/11/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feat(chat)/send-persona-message` --- ### 📝 Commits (2) - [`0b089a5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0b089a5da43ea3435575d25ca3527beaab7b981b) feat(chat): add /send command for persona messages without generation (#6050) - [`54ee83f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/54ee83f4f30bdbd95bc5057fe66bd722d0ba3ba1) Merge branch 'staging' into feat(chat)/send-persona-message ### 📊 Changes **5 files changed** (+48 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/chats/guided-and-impersonate.md` (+1 -1) 📝 `docs/chats/slash-commands.md` (+1 -0) 📝 `packages/client/src/lib/slash-commands.ts` (+12 -0) 📝 `scripts/regressions/conversation-game-slash.regression.ts` (+33 -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 Closes #6050 ## Why this change Users need a way to insert intentional persona story beats or prompt setups into the chat history without immediately triggering an LLM generation. This allows subsequent commands like `/guided <direction>` or `/as <character>` to generate in response to the newly placed persona message while maintaining natural message order. ## What changed - Added `/send <message>` slash command in `packages/client/src/lib/slash-commands.ts` (`local: true`), stripping single wrapping quotes when supplied and invoking `ctx.createMessage({ role: "user", content, characterId: null })` without calling `ctx.generate()`. - Added documentation for `/send` in `docs/chats/slash-commands.md` and referenced it under Quick Replies' Post Only action in `docs/chats/guided-and-impersonate.md`. - Added unreleased entry in `CHANGELOG.md` referencing issue `#6050`. - Added regression tests in `scripts/regressions/conversation-game-slash.regression.ts` validating `/send` matching, empty usage handling, user-role message creation, and verifying zero LLM generation calls. ## Validation - [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 - Manually verify typing `/send Hello world` in a Roleplay and Conversation chat creates a persona user message without triggering generation. - Manually verify typing `/send` without arguments returns the usage hint. - Manually verify follow-up with `/guided` steers the subsequent reply referencing the sent persona message. ## 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) N/A <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the `/send <message>` slash command. - Posts messages as the active persona without triggering an AI-generated response. - Supports messages wrapped in a single pair of quotes. - Shows usage guidance when no message is provided. - **Documentation** - Added `/send` to the chat and message command reference. - Documented it as an alternative to the “Post only” quick reply action. <!-- 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-23 04:15:58 +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#7040
No description provided.