mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5994] [Issue]: Roleplay live streaming bypasses AI-output display regex scripts #3317
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#3317
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?
Originally created by @ghost on GitHub (Sep 9, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5994
Originally assigned to: @SpicyMarinara on GitHub.
Summary
In Roleplay mode, live streamed assistant text bypasses display regex scripts. Freaky Frankenstein dialogue tags such as
<gold:measured>"Dialogue."</gold:measured>remain uncolored during generation and are transformed only after the response is committed.Expected behavior
Roleplay streaming should display the same enabled AI-output/display-regex transformations as the finalized assistant message.
When a streamed fragment contains a complete regex match, the replacement should appear during streaming without waiting for generation to finish.
Incomplete syntax at the stream boundary should remain unchanged until enough text exists for a valid match.
Actual behavior
The Roleplay live-stream output remains raw while the response is being generated. Display regex transformations do not appear during streaming.
After generation completes, the persisted message is rendered through the normal display pipeline and the Freaky Frankenstein regex transforms the content into a styled span. The dialogue color therefore appears suddenly only after the response is committed.
For example, a complete streamed fragment such as:
gold:measured"Hello."</gold:measured>
remains visible as raw text during the live response, then becomes colored after completion.
Steps to reproduce
<\s{0,8}(cyan|pink|teal|orange|gold|violet|salmon|orchid|yellow|plum)\s{0,8}>([“"][^”"]{1,2000}?[”"])(?:\s{0,8}<\s{0,8}/\s{0,8}[^<>\n\r]{0,40}>|\s{0,8}<\s{0,8}/\s{0,8}[a-zA-Z0-9_-]{0,24}:|\s{0,8}\1>)?
$2
Open a Roleplay chat with streaming enabled.
Generate a response containing a complete fragment such as:
"Hello."
Observe the streamed response before generation completes.
Observe that the raw color tag remains visible and uncolored during the live stream.
Wait for generation to finish.
Observe that the same text becomes colored only after the message is committed.
Environment
Logs, screenshots, or video
No runtime exception is emitted.
This appears to be a deterministic rendering discrepancy between the live streaming path and the finalized-message path.
The relevant behavior is:
Committed assistant messages are transformed through the AI-output display-regex pipeline.
Live Roleplay stream content is rendered without the same display-regex transformation.
The current Freaky Frankenstein regexes intentionally require a closing quotation mark:
<gold:measured>"Hellodoes not match yet.<gold:measured>"Hello."matches and should be transformed.The second form still remains uncolored during live streaming.
Additional context
Related upstream history:
Template check
Please uncheck the box below before submitting so we know you read this template. It is intentionally pre-checked:
Helper summary: The live Roleplay rendering path and the finalized-message rendering path produce different visible output for the same assistant response.
@SpicyMarinara commented on GitHub (Sep 9, 2026):
Owner: @SpicyMarinara, assisted by Codex. Taking this issue in the assigned-issue sweep, PR #6007 targeting staging. Existing outside contributor PRs are excluded from the sweep.
@SpicyMarinara commented on GitHub (Sep 9, 2026):
Addressed in #6007, merged into
stagingas46d184753d. The final CI matrix and CodeRabbit review passed; validation details and manual follow-up checks are in the PR.