feat(characters): support character-scoped conversations

This commit is contained in:
2026-07-17 11:42:31 +08:00
parent 93efcb6604
commit 2796010971
85 changed files with 1645 additions and 251 deletions
+7 -4
View File
@@ -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,