mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8660] [MERGED] feat(scene): draft a premise and opening for a new chat (scenario setup 1/5) #8730
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#8730
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/8660
Author: @Gunterlie
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @Gunterlie
Base:
scenarios-for-hoes← Head:scenarios/01-draft-route📝 Commits (5)
2bf2d4afeat(scene): draft a premise and opening for a new chatc68d649fix(scene): narrow parsed scenario openingb0d1ee3style(scene): format scenario draft route718da6efix(scene): tighten scenario draft input checks375ef00fix(scene): keep the opening speaker when revising📊 Changes
3 files changed (+194 additions, -0 deletions)
View changed files
📝
packages/server/src/routes/scene.routes.ts(+144 -0)📝
packages/shared/src/types/scene.ts(+20 -0)➕
scripts/regressions/scene-scenario-draft.regression.ts(+30 -0)📄 Description
Why
Starting a new roleplay or conversation with a character you like still takes work: you have to invent the situation and write a good first message. Game mode can already invent a setup; normal chats cannot. This feature lets the user describe what they are in the mood for, preview a premise and an opening, edit them, and start the chat.
This is part 1 of 5 of the scenario setup feature. Every part goes into the feature branch
scenarios-for-hoesas its own reviewed PR; one feature PR then brings the whole branch intostaging. There is no linked issue: this is planned work, tracked by the PR series.What changed
POST /scene/scenario-draft. It drafts{ premise, opening: { characterId, content } }for a chat that already exists (the setup wizard creates the empty chat first).resolveMacrosForPreviewon a copied macro context, so no chat state changes).reviseregenerates only the premise or only the opening. Code returns the other part byte-identical; the opening keeps its speaker.logDebugOverride(debug mode /DEBUG_AGENTS).SceneScenarioDraft,SceneScenarioDraftRequest,SceneScenarioDraftResponse.scripts/regressions/scene-scenario-draft.regression.tsfor the parser (valid, fenced, empty, malformed, missing opening, revise keeps the other part).Validation
pnpm checkpassed (before the last one-line fix); after the fix: servertsc --noEmitpassed, Prettier passed, the new regression passed.Manual verification
revise.part = "opening"on a group chat and check the speaker stays the same.Not done: no UI in this PR, and no real-model call yet.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.