Refine diffusion graph channels and drop legacy who compatibility

This commit is contained in:
2026-02-13 15:56:22 +08:00
parent 9ba120364c
commit 6aa1547d6f
6 changed files with 110 additions and 180 deletions

View File

@@ -71,11 +71,12 @@ export function buildEntityLexicon(store, context) {
add(f.s);
}
// 5. L0 atoms 的 who(新角色在 L2 总结前即可进入词典)
// 5. L0 atoms 的 edges.s/edges.t(新角色在 L2 总结前即可进入词典)
const atoms = getStateAtoms();
for (const atom of atoms) {
for (const name of (atom.who || [])) {
add(name);
for (const e of (atom.edges || [])) {
add(e?.s);
add(e?.t);
}
}
@@ -122,11 +123,12 @@ export function buildDisplayNameMap(store, context) {
if (!f.retracted) register(f.s);
}
// 5. L0 atoms 的 who
// 5. L0 atoms 的 edges.s/edges.t
const atoms = getStateAtoms();
for (const atom of atoms) {
for (const name of (atom.who || [])) {
register(name);
for (const e of (atom.edges || [])) {
register(e?.s);
register(e?.t);
}
}