mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #479] [MERGED] Optimize expression agent prompts and normalize context sizes #4634
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#4634
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/479
Author: @Xelvanis
Created: 5/6/2026
Status: ✅ Merged
Merged: 5/6/2026
Merged by: @Xelvanis
Base:
main← Head:fix/expression-engine-context-bloat📝 Commits (1)
c535930Optimize expression agent prompts and normalize context sizes📊 Changes
4 files changed (+298 additions, -39 deletions)
View changed files
📝
packages/server/src/routes/generate.routes.ts(+4 -2)📝
packages/server/src/routes/generate/retry-agents-route.ts(+2 -2)📝
packages/server/src/services/agents/agent-executor.ts(+157 -35)➕
packages/server/test/agent-executor-expression.test.ts(+135 -0)📄 Description
Expression agents now use a compact dedicated message builder that omits lore, character cards, persona descriptions, and summaries. They are also run outside the batch pipeline to avoid inflating batch context. Context sizes are clamped to 1–200 via a shared normalizeAgentContextSize helper.
Linked issue
Closes #436
Why this change
What changed
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm --filter @marinara-engine/server testpnpm checkDocs and release impact
UI evidence (if applicable)
Summary by CodeRabbit
New Features
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.