mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1720] [MERGED] [codex] Extract active lorebook scanner #5234
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#5234
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/1720
Author: @Xelvanis
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @Xelvanis
Base:
refactor← Head:codex/lorebooks-active-scanner📝 Commits (2)
0fe46b1Extract active lorebook scannerbbe0f6fFix unused remote runtime helper export📊 Changes
8 files changed (+884 additions, -457 deletions)
View changed files
➕
src/engine/generation/active-lorebook-scanner.ts(+634 -0)📝
src/engine/generation/active-lorebooks.ts(+29 -15)📝
src/engine/generation/prompt-assembly.test.ts(+146 -1)📝
src/engine/generation/prompt-assembly.ts(+42 -433)📝
src/engine/generation/tools-runtime.ts(+2 -6)📝
src/features/catalog/lorebooks/hooks/use-lorebooks.ts(+3 -0)📝
src/features/runtime/visuals/components/WorldInfoPanel.tsx(+27 -1)📝
src/shared/api/remote-runtime.ts(+1 -1)📄 Description
Linked issue
N/A
Why this change
What changed
src/engine/generation/active-lorebook-scanner.tsfor scope selection, entry loading, scanner options, per-lorebook and chat budget diagnostics, timing-state updates, and semantic scan status.Refactor impact
Primary owner:
Impact areas reviewed:
Boundary notes:
src/engine; no React, Zustand, Tauri, shared API adapter, or feature internals imported into engine code.Pressure points touched:
src/engine/generation/prompt-assembly.tswas reduced by moving lorebook scanner/budget/timing logic intoactive-lorebook-scanner.ts.src/features/runtime/visuals/components/WorldInfoPanel.tsx.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
pnpm checksuccessfully after the final diff.pnpm vitest run src/engine/generation/prompt-assembly.test.ts src/engine/generation-core/lorebooks/keyword-scanner.test.tssuccessfully: 2 files, 65 tests.pnpm buildearlier in the slice; it passed with the existing Vite large chunk warning. Build was not rerun after the final Bunny-only test/unused-export fixes becausepnpm checkand targeted tests covered the final TypeScript/import surfaces.Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo durable docs/source-ownership changes were needed for this internal engine refactor and small Active World Info notice.
UI evidence
No screenshot attached. UI change is limited to the Active World Info semantic-degrade notice; native/manual UI QA remains a gap.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.