mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6103] [MERGED] feat: automate Roleplay context and memory management #7063
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#7063
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/6103
Author: @SpicyMarinara
Created: 9/12/2026
Status: ✅ Merged
Merged: 9/12/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/advanced-roleplay-memory📝 Commits (6)
b1c6251docs: record advanced Roleplay memory implementation71a207dfeat: automate Roleplay context and memory management2954c83fix: protect advanced memory metadata and downgrade storage96cce00fix: harden advanced memory setup and data handling3a77d9bfix: normalize advanced memory reindex validation errors66d1b1ffix: preserve disabled and unsupported imported memories📊 Changes
50 files changed (+7490 additions, -123 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/FAQ.md(+2 -0)📝
docs/agents/memory.md(+47 -2)➕
e2e/advanced-memory.e2e.ts(+401 -0)➕
packages/client/public/sprites/mari/generated/professor-mari-memory-wheel.png(+0 -0)➕
packages/client/public/sprites/mari/generated/professor-mari-memory-wheel.prompt.md(+7 -0)➕
packages/client/src/components/chat/AdvancedMemoryInspector.tsx(+278 -0)➕
packages/client/src/components/chat/AdvancedMemoryProgress.tsx(+95 -0)➕
packages/client/src/components/chat/AdvancedMemorySettings.tsx(+387 -0)📝
packages/client/src/components/chat/ChatArea.tsx(+11 -0)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+46 -6)➕
packages/client/src/components/chat/advanced-memory.css(+42 -0)📝
packages/client/src/components/presets/PresetEditor.tsx(+23 -7)📝
packages/client/src/features/chat-settings/ChatSettingsSection.tsx(+11 -2)➕
packages/client/src/hooks/use-advanced-memory.ts(+99 -0)📝
packages/client/src/hooks/use-generate.ts(+34 -0)📝
packages/client/src/localization/locales/en.json(+104 -0)📝
packages/server/src/db/file-backed-store.ts(+5 -0)➕
packages/server/src/db/schema/advanced-memory.ts(+30 -0)📝
packages/server/src/db/schema/index.ts(+1 -0)...and 30 more files
📄 Description
Linked issue
Closes #6102
Why this change
Long Roleplay chats require users to maintain summaries and cut history by hand. Advanced Memory Recall (Alpha) manages that work within a chosen context budget while retaining the original transcript and respecting each character's knowledge.
What changed
Validation
Completed local automated checks:
pnpm install --frozen-lockfilepnpm check(includes localization, formatting, TypeScript, ESLint, E2E types and production builds)pnpm regression:prompt(prompt assembly, attachments and context fitting)TMPDIR=/private/tmp pnpm regression:launcher-update(including offline conversion of the new memory table)advanced-memory-core,advanced-memory-context,advanced-memory-generation,chat-branch-lineage, existingmemory-recall-revectorize, andcapability-gm-verbsmetadata ownership.The isolated fixtures cover 800 messages, cancellation/resume without repeating a completed summary batch, private source gaps, edited/disabled summaries, exact promise/correction recall and unrelated-topic abstention, historical regeneration, impersonation, all preview entry points, preset scoping, macro edits, hidden tracker fields, fresh-ID imports and native profile export/restore. Added fault-injected branch rollback, joined-caller cancellation, bounded archive reads, reordered import dependencies, macro-resolved JSONL source validation, dropped-recall receipts, pre-run preview errors, unsupported import exclusion, and preservation of disabled corrections during initialization. Providers are deterministic local mocks; these checks do not establish recall quality or cost on real models.
Focused
pnpm smoke:ui e2e/advanced-memory.e2e.ts --workers=1passed in desktop Chromium (2/2), mobile Chromium and mobile WebKit (4/4). Verified setup/knowledge confirmation, keyboard focus, cancel/close/reopen/resume, editing, source inspection, disabling recall, Standard-mode restoration, light/dark Chroma colors and reduced motion. The review follow-up also covers 104-message knowledge paging with preserved off-page selections, explicit section opening over remembered collapse, and omitted-versus-false blocking errors.pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Docs and release impact
Updated
CHANGELOG.md,docs/agents/memory.mdanddocs/FAQ.md. Translation follow-up: #6106. No version bump or new dependency.UI evidence (if applicable)
Actual synthetic-chat screenshots: desktop and mobile browser evidence. Progress captures show initialization; inspector captures show the completed scene after a saved correction and exclusion from recall. No private chat data appears in the fixtures. Sprite source and generation prompt are included together under
packages/client/public/sprites/mari/generated/professor-mari-memory-wheel.*.Rendered Professor Mari wheel during initialization (synthetic chat, light Chroma theme):
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.