refactor(chat): split machine and repository flows

This commit is contained in:
2026-06-30 19:16:33 +08:00
parent d33c34d751
commit ed109f25a0
12 changed files with 908 additions and 730 deletions
+13
View File
@@ -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);