mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3334] [MERGED] Refactor generation route runtimes #5882
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#5882
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/3334
Author: @SpicyMarinara
Created: 7/7/2026
Status: ✅ Merged
Merged: 7/7/2026
Merged by: @SpicyMarinara
Base:
staging← Head:codex/split-generate-routes📝 Commits (3)
62648afRefactor generation route runtimes80cbad0Fix guided roleplay targeting and first-turn lorebooks69fc9cbApply CodeRabbit generation runtime suggestions📊 Changes
37 files changed (+6379 additions, -4921 deletions)
View changed files
📝
CHANGELOG.md(+3 -0)📝
packages/client/src/components/chat/ChatInput.tsx(+4 -0)📝
packages/client/src/lib/slash-commands.ts(+87 -1)📝
packages/server/src/routes/generate.routes.ts(+432 -4914)➕
packages/server/src/routes/generate/agent-result-capabilities.ts(+53 -0)➕
packages/server/src/routes/generate/connected-conversation-injections.ts(+108 -0)➕
packages/server/src/routes/generate/conversation-connected-context.ts(+226 -0)➕
packages/server/src/routes/generate/conversation-context-block.ts(+129 -0)➕
packages/server/src/routes/generate/conversation-custom-assets.ts(+680 -0)➕
packages/server/src/routes/generate/conversation-history-runtime.ts(+518 -0)➕
packages/server/src/routes/generate/conversation-presence-runtime.ts(+324 -0)➕
packages/server/src/routes/generate/conversation-prompt-formatting.ts(+76 -0)➕
packages/server/src/routes/generate/image-captioning-runtime.ts(+294 -0)➕
packages/server/src/routes/generate/lorebook-scan-snapshot.ts(+27 -0)➕
packages/server/src/routes/generate/professor-mari-prompt-context.ts(+92 -0)➕
packages/server/src/services/generation/agent-prompt-runtime.ts(+26 -0)➕
packages/server/src/services/generation/conversation-call-command-runtime.ts(+117 -0)➕
packages/server/src/services/generation/conversation-command-runtime.ts(+325 -0)➕
packages/server/src/services/generation/conversation-cross-post-command-runtime.ts(+72 -0)➕
packages/server/src/services/generation/conversation-music-command-runtime.ts(+114 -0)...and 17 more files
📄 Description
Linked issue
Fixes #3332.
Also includes a maintainer-reported Roleplay
/guidedregression in individual group chats.Why this change
packages/server/src/routes/generate.routes.tshad grown into a very large route file with prompt setup, provider runtime setup, conversation context building, agent handling, and command side effects all interleaved. This made v2.1.1 generation work harder to review and riskier to maintain.While validating the branch, two Roleplay regressions surfaced:
/guidedin Individual-Manual group chats could no-op because no explicit responder was sent.(1)responder win over/guided respond for <character>intent.Issue #3332 also showed that first-turn lorebook scans could miss opening group greetings once the recent-message scan window trimmed earlier starter messages.
What changed
generate.routes.ts./guided respond for <character> <direction>so it sends an explicitforCharacterId, clears that character's pending smart queue badge, and prompts for a target in Individual-Manual groups instead of silently doing nothing.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
AI-run validation completed, boxes intentionally left unchecked for human verification:
pnpm --filter @marinara-engine/client exec tsc --noEmitpnpm --filter @marinara-engine/client lintpnpm --filter @marinara-engine/server exec tsc --noEmitpnpm checkpnpm regression:promptgit diff --checkNo browser/manual UI pass was performed; the
/guidedchange is client request routing and the lorebook fix is covered by a prompt regression.Docs and release impact
Updated
CHANGELOG.mdfor v2.1.1. No version files changed.UI evidence (if applicable)
N/A — no visual UI changes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.