feat(characters): support character-scoped conversations
This commit is contained in:
@@ -188,6 +188,7 @@ export const unlockingHistoryState = unlockMachineSetup.createStateConfig({
|
||||
invoke: {
|
||||
id: "unlockHistory",
|
||||
src: "unlockHistory",
|
||||
input: ({ context }) => ({ characterId: context.characterId }),
|
||||
onDone: {
|
||||
target: "ready",
|
||||
actions: applyUnlockHistoryOutputAction,
|
||||
@@ -203,11 +204,13 @@ export const unlockingMessageState = unlockMachineSetup.createStateConfig({
|
||||
invoke: {
|
||||
id: "unlockMessage",
|
||||
src: "unlockMessage",
|
||||
input: ({ context }) =>
|
||||
context.unlockingMessage ?? {
|
||||
input: ({ context }) => ({
|
||||
characterId: context.characterId,
|
||||
...(context.unlockingMessage ?? {
|
||||
displayMessageId: "",
|
||||
kind: "private",
|
||||
},
|
||||
kind: "private" as const,
|
||||
}),
|
||||
}),
|
||||
onDone: [
|
||||
{
|
||||
guard: ({ event }) => event.output.response.unlocked,
|
||||
|
||||
Reference in New Issue
Block a user