mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #354] [MERGED] fix(agents): load available sprites and validate expressions in retry-agents path #4576
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#4576
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/354
Author: @Lochalan
Created: 5/2/2026
Status: ✅ Merged
Merged: 5/3/2026
Merged by: @SpicyMarinara
Base:
main← Head:fix/retry-agents-expression-validation📝 Commits (1)
6517608fix(agents): load available sprites and validate expressions in retry-agents path📊 Changes
1 file changed (+134 additions, -0 deletions)
View changed files
📝
packages/server/src/routes/generate/retry-agents-route.ts(+134 -0)📄 Description
Linked issue
Closes #353
Why this change
When manually re-running the Expression Engine via the retry button, the agent hallucinates expression names that don't exist as sprite files (e.g. "intense_focus", "intrigued"). The sprite silently fails to update. This is because
retry-agents-route.tsnever loads available sprites into the agent context, has no validation, and sends unvalidated results to the client before any checks run.What changed
Three fixes in
packages/server/src/routes/generate/retry-agents-route.ts:buildRetryAgentContext()now loads_availableSprites(and_availableBackgrounds) from the filesystem when the expression/background agent is being retried, matching the logic ingenerate.routes.tsagent_resultevent is sent to the client (case-insensitive matching with substring fallback)applyRetryResultEffects()now has asprite_changehandler that persists validated expressions to message and swipe extraValidation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm check— passes with 0 errors (1 pre-existing warning in GameNarration.tsx, unrelated)pnpm dev:server, opened a roleplay chat with a character that has sprite filesDocs and release impact
UI evidence (if applicable)
Before
After
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.