mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #586] [MERGED] Add /hide and /unhide slash commands for bulk AI context control #4687
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4687
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/586
Author: @kevin-ho
Created: 5/9/2026
Status: ✅ Merged
Merged: 5/9/2026
Merged by: @Romuromylus
Base:
main← Head:feature/bulk-hide-slash-command📝 Commits (3)
ffc8f06feat: add /hide and /unhide slash commands for bulk AI context control3062dc0fix: address CodeRabbit review feedback on PR #586854a44fMerge branch 'main' into feature/bulk-hide-slash-command📊 Changes
3 files changed (+168 additions, -0 deletions)
View changed files
📝
packages/client/src/lib/slash-commands.ts(+132 -0)📝
packages/server/src/routes/chats.routes.ts(+16 -0)📝
packages/server/src/services/storage/chats.storage.ts(+20 -0)📄 Description
Linked issue
Closes #585
Why this change
Users in long roleplay conversations (200+ messages) often want to exclude large stretches from the AI's context — hiding old plot arcs, OOC exchanges, or redundant messages to reclaim token budget. The per-message UI eye icon makes bulk management impractical. Adding slash commands lets users type
/hide 1-200instead of clicking 200 times.What changed
Client (
packages/client/src/lib/slash-commands.ts, +~80 lines):/hideand/unhideslash commands with argument parser supporting single indices (5), ranges (3-8), comma-separated (2,5,9), and mixed (2-5,8,12-14)PATCH /:chatId/messages/bulk-hiddeninstead of hundreds of per-message requests/helpautocompleteServer (
packages/server/src/routes/chats.routes.ts+chats.storage.ts, +~20 lines):PATCH /:chatId/messages/bulk-hiddenendpoint acceptingmessageIds: string[], hidden: boolean }bulkSetHiddenFromAI()loops the existingupdateMessageExtra()— same proven code path as the single-message UI toggle (read-parse-merge-write + swipe sync)messageIdsis a non-empty array andhiddenis a booleanValidation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm check— all workspace lint/type checks pass, production build successful/hide 207(single),/hide 206-207(range),/hide 1-207(bulk 207 messages) — all succeeded with correct toast feedback, messages dimmed after invalidation/unhide 1-207— all messages restored, toast reads "Restored 207 messages to AI context"PATCH /api/chats/:chatId/messages/bulk-hiddenreturnsupdated: N }correctly for both hide and unhidePATCH .../extraendpoint still functions correctly (no regression)Docs and release impact
No docs or release metadata changes included. Slash commands are self-documenting via
/help.Summary by CodeRabbit
/hideand/unhideslash commands to control which messages the AI considers.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.