feat(chat): sync multi-role backend APIs

This commit is contained in:
2026-07-20 11:29:54 +08:00
parent 16b5c16e76
commit b6fdc912ae
84 changed files with 1488 additions and 439 deletions
@@ -108,36 +108,36 @@ describe("character actor route providers", () => {
});
it("recreates chat and chat payment actors when the character changes", () => {
renderChat("character_elio");
renderChat("elio");
const firstChatInstance = instanceId("chat-provider");
const firstPaymentInstance = instanceId("payment-provider");
renderChat("character_maya");
renderChat("maya-tan");
expect(instanceId("chat-provider")).not.toBe(firstChatInstance);
expect(instanceId("payment-provider")).not.toBe(firstPaymentInstance);
expect(testNode("chat-provider").dataset.characterId).toBe(
"character_maya",
"maya-tan",
);
});
it("recreates the private-room actor when the character changes", () => {
renderPrivateRoom("character_elio");
renderPrivateRoom("elio");
const firstInstance = instanceId("private-room-provider");
renderPrivateRoom("character_maya");
renderPrivateRoom("maya-tan");
expect(instanceId("private-room-provider")).not.toBe(firstInstance);
expect(testNode("private-room-provider").dataset.characterId).toBe(
"character_maya",
"maya-tan",
);
});
it("recreates the route payment actor when its character scope changes", () => {
renderPayment("character_elio");
renderPayment("elio");
const firstInstance = instanceId("payment-provider");
renderPayment("character_maya");
renderPayment("maya-tan");
expect(instanceId("payment-provider")).not.toBe(firstInstance);
});