mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#5688
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/2603
Author: @kolacheee
Created: 6/17/2026
Status: ✅ Merged
Merged: 6/18/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/staging-scoped-regex📝 Commits (10+)
dedf986feat(lorebooks): nested folders — server unblock + cycle guard8ca8af7feat(lorebooks): nested folders — client tree UI + ancestor-aware disable600f730feat(lorebooks): drag-to-nest folders — three-zone drag + root un-nest5dab11afeat(lorebooks): clone a folder — deep copy of sub-folders and entries916fa1dfix(lorebooks): drop entries into the innermost folder under the cursorc7cb2b9fix(lorebooks): arm folder drag synchronously so it reliably starts2688826fix(lorebooks): nest a dragged folder when dropped into another folder's bodybe3cddafix(lorebooks): stop the un-nest strip from cancelling nested-folder dragsc039951fix(lorebooks): un-nest a subfolder by dragging it down into its parent's bodyb9377d4fix(lorebooks): un-nest a folder dropped onto the root-entries area📊 Changes
131 files changed (+10783 additions, -4199 deletions)
View changed files
📝
package.json(+1 -0)📝
packages/client/src/components/agents/AgentEditor.tsx(+196 -117)📝
packages/client/src/components/agents/RegexScriptEditor.tsx(+37 -32)📝
packages/client/src/components/agents/SecretPlotPanel.tsx(+165 -361)📝
packages/client/src/components/agents/ToolEditor.tsx(+27 -21)📝
packages/client/src/components/characters/CharacterEditor.tsx(+28 -36)📝
packages/client/src/components/characters/CharacterLibraryView.tsx(+7 -7)➕
packages/client/src/components/chat/AgentAddSetupFields.tsx(+1492 -0)📝
packages/client/src/components/chat/ChatArea.tsx(+89 -26)📝
packages/client/src/components/chat/ChatGallery.tsx(+20 -4)📝
packages/client/src/components/chat/ChatInput.tsx(+74 -41)📝
packages/client/src/components/chat/ChatMessage.tsx(+79 -15)📝
packages/client/src/components/chat/ChatRoleplaySurface.tsx(+69 -92)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+1628 -862)📝
packages/client/src/components/chat/ChatSetupWizard.tsx(+184 -88)📝
packages/client/src/components/chat/ConversationInput.tsx(+28 -10)📝
packages/client/src/components/chat/ConversationMessageShared.tsx(+36 -5)📝
packages/client/src/components/chat/HomeAchievements.tsx(+21 -13)📝
packages/client/src/components/chat/HomeProfessorMariChat.tsx(+9 -2)📝
packages/client/src/components/chat/NewChatConnectionGate.tsx(+5 -8)...and 80 more files
📄 Description
Linked issue
Closes #2581
Why this change
Regex scripts in
stagingalready support per-script character targeting (targetCharacterIds), but only at prompt-assembly time — those scripts are forced "prompt-only," so they rewrite the prompt sent to the model and never touch what's shown in chat. At display time (theapplyToAIOutput/applyToUserInputtransforms that shape the visible text), scripts run globally, with no character scope and no per-chat control.This ports the display-time character scoping from #1749, governed by a per-chat tri-state mode (Disabled / Exclusive / Chat — the same pattern as card theming). It reuses the existing
targetCharacterIdsas the scope (the array generalizes #1749's singlecharacterId) rather than adding a parallel field, so there's one scope concept across prompt- and display-time.What changed
Shared
types/chat.ts— addedscopedRegexMode?: "disabled" | "exclusive" | "chat"toChatMetadata(mirrorscardCssMode). Defaults to"disabled"— scoped scripts stay off at display unless opted in per chat.Client
use-apply-regex.ts—applyToAIOutput/applyToUserInputacceptscopedMode+ the message'scharacterId. A character-scoped script (non-emptytargetCharacterIds) now applies at display per the mode:disabled→ off;exclusive→ only on a target character's own messages;chat→ every message. Global scripts (no targets) are unaffected; prompt-time targeting is unchanged.Server
st-character.importer.ts— on SillyTavern import, extracts the card'sextensions.regex_scriptsand creates each as a character-scoped script (targeting the imported character): parses/source/flags(or a bare source), maps numeric placements (1 → user input, 2 → AI output, default AI output),disabled→enabled, and carries trim strings + min/max depth. Patterns that are empty, ReDoS-prone (isPatternSafe), or won't compile are skipped (logged, non-fatal). Imported scripts are display-scoped, so they stay opt-in via the mode. Server-side, so every import path (file, charx, bot browser) is covered.importSTCharacter+ the single/batch/bulk import routes thread aregexScriptScope(character|global, defaultcharacter). Global drops the imported scripts into the Presets → REGEXES list (emptytargetCharacterIds) instead of scoping them to the bot.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
regex_scriptswith Character only → the scripts are scoped to that bot; with Global → they land in Presets → REGEXES and apply everywhere.Docs and release impact
UI evidence (if applicable)
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.