mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
Fix cognition owner label collisions in UI
This commit is contained in:
@@ -114,6 +114,18 @@ applyCognitionUpdates(
|
||||
],
|
||||
{ changedNodeIds: [bellEvent.id] },
|
||||
);
|
||||
applyCognitionUpdates(
|
||||
graph,
|
||||
[
|
||||
{
|
||||
ownerType: "user",
|
||||
ownerName: "露西亚",
|
||||
knownRefs: [bellEvent.id],
|
||||
visibility: [{ ref: bellEvent.id, score: 0.8 }],
|
||||
},
|
||||
],
|
||||
{ changedNodeIds: [bellEvent.id] },
|
||||
);
|
||||
applyManualKnowledgeOverride(graph, {
|
||||
ownerKey: ownerA.ownerKey,
|
||||
nodeId: bellEvent.id,
|
||||
@@ -149,5 +161,11 @@ assert.ok(
|
||||
(entry) => entry.ownerName === "露西亚" && entry.knownCount >= 1,
|
||||
),
|
||||
);
|
||||
const sameNameOwners = ownerList.filter((entry) => entry.ownerName === "露西亚");
|
||||
assert.equal(sameNameOwners.length, 2);
|
||||
assert.deepEqual(
|
||||
sameNameOwners.map((entry) => entry.ownerType).sort(),
|
||||
["character", "user"],
|
||||
);
|
||||
|
||||
console.log("knowledge-state tests passed");
|
||||
|
||||
Reference in New Issue
Block a user