refactor(chat): split machine and repository flows
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { assign as xAssign } from "xstate";
|
||||
|
||||
import type { ChatEvent } from "./chat-events";
|
||||
import type { ChatState } from "./chat-state";
|
||||
|
||||
export type ChatActionArgs = { context: ChatState; event: ChatEvent };
|
||||
export type ChatContextArgs = { context: ChatState };
|
||||
|
||||
export const chatAssign = (
|
||||
assignment: Parameters<
|
||||
typeof xAssign<ChatState, ChatEvent, undefined, ChatEvent, never>
|
||||
>[0],
|
||||
) => xAssign<ChatState, ChatEvent, undefined, ChatEvent, never>(assignment);
|
||||
Reference in New Issue
Block a user