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:
2026-06-11 09:35:26 +08:00
parent 2bc2e1b691
commit d4cb40a74b
16 changed files with 30 additions and 123 deletions
-12
View File
@@ -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";
+4 -12
View File
@@ -1,18 +1,10 @@
/**
* @file Chat 公共导出
* Chat 状态机公共导出barrel
*
* 状态机重构后:
* - 业务类(Dart 风格 context/reducer/side-effects)已合并到 chat-machine.ts
* - 类型由 chat-types.ts 重新导出
* - React 入口为 chat-context.tsxuseMachine 包装)
* - Context 形状与初始值位于 chat-context.ts
* - 事件联合位于 chat-events.ts
*
* 注:chat-side-effects.ts 暂未删除(其中 WebSocket 长生命周期逻辑
* 待下一轮迁移到 fromCallback actor)。
* 重新导出 Chat store 的所有公共 APIstate / 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";