You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(cli): consolidate state management with Zustand stores
- Remove duplicate state from chat-store (streamingAgents, focusedAgentId, inputFocused, activeSubagents, isChainInProgress)
- Move streaming state to stream-store and UI state to ui-store
- Eliminate prop drilling by having components use stores directly
- Update MessageWithAgents to use useUiStore instead of prop drilling setFocusedAgentId
- Keep React contexts for derived values (ChatThemeProvider) and callbacks (MessageActionsProvider) only
- Add comprehensive state management architecture documentation to cli/knowledge.md
This ensures each piece of state has a single source of truth and follows the principle:
Use Zustand stores for state, React Context for derived values and callbacks.
0 commit comments