mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
feat: MVU规则模块+世界书MVU过滤+prompt组装MVU清洗+端到端测试
This commit is contained in:
20
task-ejs.js
20
task-ejs.js
@@ -402,6 +402,22 @@ async function resolveEntry(renderCtx, currentWorldbook, worldbookOrEntry, entry
|
||||
renderCtx.allEntries.get(identifier);
|
||||
}
|
||||
|
||||
if (
|
||||
!resolved &&
|
||||
typeof renderCtx.resolveIgnoredEntry === "function"
|
||||
) {
|
||||
const ignoredEntry =
|
||||
renderCtx.resolveIgnoredEntry(explicitWorldbook || fallbackWorldbook, identifier) ||
|
||||
renderCtx.resolveIgnoredEntry("", identifier);
|
||||
if (ignoredEntry) {
|
||||
const descriptor = ignoredEntry.sourceName || ignoredEntry.name || identifier;
|
||||
recordRenderWarning(
|
||||
renderCtx,
|
||||
`mvu filtered world info blocked: ${ignoredEntry.worldbook ? `${ignoredEntry.worldbook}/` : ""}${descriptor}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return resolved;
|
||||
}
|
||||
|
||||
@@ -631,6 +647,10 @@ export function createTaskEjsRenderContext(entries = [], options = {}) {
|
||||
typeof options.loadWorldbookEntries === "function"
|
||||
? options.loadWorldbookEntries
|
||||
: null,
|
||||
resolveIgnoredEntry:
|
||||
typeof options.resolveIgnoredEntry === "function"
|
||||
? options.resolveIgnoredEntry
|
||||
: null,
|
||||
templateContext: {
|
||||
...(options.templateContext || {}),
|
||||
hostSnapshot: hostSnapshot.snapshot,
|
||||
|
||||
Reference in New Issue
Block a user