mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #805] [MERGED] Fix assistant command escaped text parsing #4778
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#4778
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/805
Author: @cha1latte
Created: 5/13/2026
Status: ✅ Merged
Merged: 5/13/2026
Merged by: @cha1latte
Base:
main← Head:fix/issue-787-command-parser-quotes📝 Commits (2)
064eb8cFix assistant command escaped text parsingf39effbHandle smart quote assistant command params📊 Changes
2 files changed (+138 additions, -23 deletions)
View changed files
📝
packages/server/src/services/conversation/character-commands.ts(+76 -23)📝
packages/server/test/character-commands.test.ts(+62 -0)📄 Description
Linked issue
Closes #787
Closes #799
Why this change
Professor Mari's
[update_character]command parser treated an escaped double quote inside a text value as the end of that field. That truncated saved character fields at the first\"and left a trailing backslash.The same parser path also kept escaped newline sequences as literal
\ntext instead of converting them to actual line breaks before the update command was persisted.The adjacent smart-punctuation report showed that assistant commands using curly quote delimiters could parse as no command at all, which made character card writes appear successful from the assistant's point of view while no update reached the card-writing path.
What changed
\",\\,\n,\r,\t) before command values are stored.create_personaandupdate_personaassistant text fields.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Codex machine verification:
pnpm --filter @marinara-engine/server exec tsx ../../scratch/issue-787-repro.mjs: before the fix,descriptionparsed asShe goes by \andscenarioremained literalFirst paragraph\n\nSecond paragraph.She goes by "The Bread Witch" and everyone knows it.andFirst paragraph/Second paragraphseparated by real newline characters.pnpm --filter @marinara-engine/server exec tsx ../../scratch/issue-799-repro.mjs ../../scratch/issue-799-proof-before.json: before the fix, the smart-quoted[update_character]command parsed as no command (commands: []).pnpm --filter @marinara-engine/server exec tsx ../../scratch/issue-799-repro.mjs ../../scratch/issue-799-proof-after.json; it parsed the character name, description, em dash, and alternate greetings.pnpm --filter @marinara-engine/server exec tsx --import ./test/setup-env.ts --test test/character-commands.test.ts; all 13 parser tests passed.pnpm check; it passed.No true human-only verification is required for the core claim. This is parser logic with focused command-output proof rather than a visible UI change.
Docs and release impact
No docs, release, schema, dependency, or version files changed.
UI evidence (if applicable)
N/A. This is assistant command parser logic, not a visible UI change. Proof is command-output based in the validation notes above.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.