chore: migrate contexts to stores and refresh barrel exports
- Move state management from `src/contexts` to `src/stores` (zustand-based) - Update barrelsby config to include new stores directory - Add bottom-sheet and auth-background components - Auto-open browser on dev server ready in VS Code launch config - Refresh generated barrel index files
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Chat 类型(向后兼容 re-export)
|
||||
*
|
||||
* 原始文件定义了 ChatState 接口、ChatEvent 联合、initialChatState、GuestChatQuota。
|
||||
* 状态机重构后:
|
||||
* - `ChatEvent` 联合由 `chat-events.ts` 导出
|
||||
* - Context 形状与初始值由 `chat-context.ts` 导出
|
||||
* - `ChatState` 由 `chat-context.tsx` 导出(保持原 API 兼容)
|
||||
* - `GuestChatQuota` 仍由 `chat-machine.ts` 导出(业务常量,与上下文配对紧密)
|
||||
*/
|
||||
export type { ChatEvent } from "./chat-events";
|
||||
export { GuestChatQuota } from "./chat-machine";
|
||||
@@ -1,18 +1,10 @@
|
||||
/**
|
||||
* @file Chat 公共导出
|
||||
* Chat 状态机公共导出(barrel)
|
||||
*
|
||||
* 状态机重构后:
|
||||
* - 业务类(Dart 风格 context/reducer/side-effects)已合并到 chat-machine.ts
|
||||
* - 类型由 chat-types.ts 重新导出
|
||||
* - React 入口为 chat-context.tsx(useMachine 包装)
|
||||
* - Context 形状与初始值位于 chat-context.ts
|
||||
* - 事件联合位于 chat-events.ts
|
||||
*
|
||||
* 注:chat-side-effects.ts 暂未删除(其中 WebSocket 长生命周期逻辑
|
||||
* 待下一轮迁移到 fromCallback actor)。
|
||||
* 重新导出 Chat store 的所有公共 API(state / events / machine / React Provider + GuestChatQuota)。
|
||||
*/
|
||||
|
||||
export * from "./chat-state";
|
||||
export * from "./chat-context";
|
||||
export * from "./chat-events";
|
||||
export * from "./chat-types";
|
||||
export { chatMachine } from "./chat-machine";
|
||||
export * from "./chat-machine";
|
||||
|
||||
Reference in New Issue
Block a user