Commit 942ab09
committed
refactor(cli): simplify architecture with auth store and MessageBlock
split
- Create auth-store.ts for centralized authentication state management -
Reduce Chat component props from 11 to 8 (remove auth prop drilling) -
Split 900-line MessageBlock into 4 focused modules: - message-block.tsx
(220 lines) - message orchestration - blocks/agent-body.tsx (280 lines)
- agent rendering - blocks/blocks-renderer.tsx (280 lines) - block
iteration - utils/block-tree.ts - shared block manipulation utilities -
Extract block manipulation logic to reusable utilities - Eliminate 100+
lines of duplicate recursive block code
All tests pass (231/231) and typechecks clean.1 parent eda6427 commit 942ab09
File tree
12 files changed
+1511
-1215
lines changed- cli/src
- commands
- components
- blocks
- hooks
- state
- utils
12 files changed
+1511
-1215
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 63 | + | |
70 | 64 | | |
71 | 65 | | |
72 | 66 | | |
| |||
221 | 215 | | |
222 | 216 | | |
223 | 217 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | 218 | | |
229 | 219 | | |
| 220 | + | |
230 | 221 | | |
231 | 222 | | |
232 | 223 | | |
0 commit comments