mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #376] [MERGED] fix(generate): execute character commands when response has no prose #4591
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#4591
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/376
Author: @cha1latte
Created: 5/3/2026
Status: ✅ Merged
Merged: 5/3/2026
Merged by: @cha1latte
Base:
main← Head:fix/empty-response-when-only-commands📝 Commits (1)
839a1a7fix(generate): execute character commands when response has no prose📊 Changes
2 files changed (+15 additions, -1 deletions)
View changed files
📝
packages/client/src/hooks/use-generate.ts(+3 -0)📝
packages/server/src/routes/generate.routes.ts(+12 -1)📄 Description
Summary
When Professor Mari emits a bare character command (e.g.
[fetch:type="character" name="Becky"]) with no surrounding prose, the empty-response guard short-circuits with"The AI returned an empty response"and the parsed command never reaches the executor. The fetch silently drops; the user just sees an error toast.This was reproducible by asking Mari to fetch a character to copy from — see attached server log:
Why
Bare command directives are valid output for Mari — they're tool calls. The "empty response" detector was conflating "model wrote nothing useful" with "model wrote nothing visible." Commands aren't visible but they're useful.
Changes
parsedCommands.length > 0, skip the error path and return the commands so they execute. Don't save a blank assistant bubble. The truly-empty case (no prose AND no commands) still surfaces the same error.data_fetchedaction (matches the existing toasts forcharacter_created/persona_created/ etc.).Test plan
Fetched character: <name>toast appears (instead of the empty-response error).Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.