feat(chat): sync multi-role backend APIs
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user