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
@@ -80,6 +80,7 @@ export function createTestChatMachine(
unlockHistoryOutput?: UnlockHistoryOutput;
unlockHistoryError?: Error;
unlockMessageOutput?: TestUnlockMessageOutput;
unlockMessageError?: Error;
} = {},
) {
return chatMachine.provide({
@@ -134,6 +135,7 @@ export function createTestChatMachine(
MachineUnlockMessageOutput,
UnlockMessageRequest & { characterId: string }
>(async ({ input }) => {
if (options.unlockMessageError) throw options.unlockMessageError;
const output = options.unlockMessageOutput ?? {
messageId: input.messageId ?? input.displayMessageId,
response: makeUnlockPrivateResponse(),