feat(phase-11): add store coordinator layer

- Create store/index.ts as unified entry point
- Add useCompositeStore() hook for multi-slice access
- Add initializeStores() for client injection
- Re-export all individual stores for direct access
- Maintain backward compatibility with useGatewayStore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-15 20:18:44 +08:00
parent f22b1a2095
commit 01737a7ef5
2 changed files with 264 additions and 3 deletions

View File

@@ -567,12 +567,12 @@ ZCLAW 是基于 **OpenFang** (Rust Agent OS) 的 AI Agent 桌面客户端,核
*`handStore.ts` (498 行) - Hands、Triggers、Approvals
*`workflowStore.ts` (255 行) - Workflows、WorkflowRuns
*`configStore.ts` (537 行) - QuickConfig、Channels、Skills、Models
*`store/index.ts` - 协调层,组合所有 stores
* Store 行数: gatewayStore 1660 → 5 个子 Store (平均 358 行)
* 待完成:
* 🔄 创建协调层 (coordinator)
* 🔄 更新组件导入
* 🔄 更新组件导入 (可选,向后兼容)
* 代码质量:
* ✅ TypeScript 类型检查通过
*下一步: Phase 11 协调层创建*
*下一步: Phase 12 性能优化*