mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1390] [MERGED] Restore character field prompt macros #5059
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#5059
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/1390
Author: @Xelvanis
Created: 5/27/2026
Status: ✅ Merged
Merged: 5/27/2026
Merged by: @Xelvanis
Base:
refactor← Head:fix/char-field-prompt-macros📝 Commits (2)
0a1b9dcRestore character field prompt macros1ce13c5Bound conditional character field recursion📊 Changes
9 files changed (+423 additions, -39 deletions)
View changed files
📝
src/engine/generation/prompt-assembly.test.ts(+57 -0)📝
src/engine/generation/prompt-assembly.ts(+4 -0)📝
src/engine/shared/macros/macro-engine.test.ts(+150 -1)📝
src/engine/shared/macros/macro-engine.ts(+166 -38)📝
src/features/catalog/agents/components/RegexScriptEditor.tsx(+2 -0)📝
src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.ts(+2 -0)📝
src/features/runtime/visuals/types.ts(+2 -0)➕
src/shared/lib/chat-macros.test.ts(+23 -0)📝
src/shared/lib/chat-macros.ts(+17 -0)📄 Description
Linked issue
Closes #1335
Why this change
{{charSysInfo}}or{{charPostHistory}}, leaving legacy character system and post-history prompt fields unavailable in prompt/display macro expansion.What changed
{{charSysInfo}}and{{charPostHistory}}to the shared macro engine, supported macro list, active-character context, and grouped character expansion.systemPromptandpostHistoryInstructionsthrough prompt assembly, shared chat macro helpers, chat surface character maps, runtime visual character maps, and regex script live-test context.Refactor impact
Primary owner:
engine generation / shared macro engine
Impact areas reviewed:
SUPPORTED_MACROSBoundary notes:
Pressure points touched:
Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
Agent-run local checks:
pnpm vitest run src/engine/shared/macros/macro-engine.test.tspnpm vitest run src/engine/shared/macros/macro-engine.test.ts src/engine/generation/prompt-assembly.test.ts src/shared/lib/chat-macros.test.tspnpm typecheckpnpm check:architecturegit diff --checkpnpm testpnpm lintpnpm buildgit diff --cached --checkNo native Tauri/manual prompt-preview QA was run; this is the remaining end-to-end app verification gap.
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo changelog file exists on this branch, so no changelog update was made.
UI evidence
Not applicable: this does not change visible layout. The only UI-adjacent change updates macro live-test sample context.
Summary by CodeRabbit
New Features
{{charSysInfo}}for character system prompts and{{charPostHistory}}for character post-history instructions, enabling enhanced character-based prompt customization.Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.