feat: implement Zustand state management #74
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements Zustand stores for centralized state management across the renderer process.
Changes
New Store Files
src/renderer/stores/auth.store.ts- Authentication state managementsrc/renderer/stores/chat.store.ts- Chat session and streaming statesrc/renderer/stores/conversation.store.ts- Conversation history managementsrc/renderer/stores/models.store.ts- Model providers and configurationsrc/renderer/stores/tools.store.ts- Tools and enabled/disabled statesrc/renderer/stores/workspace.store.ts- Workspace managementsrc/renderer/stores/types.ts- Shared store typessrc/renderer/stores/index.ts- Store initialization and exportsRefactored Components
src/renderer/app/App.tsx- Use store initializationsrc/renderer/layouts/components/WorkspaceSwitcher.tsx- Use workspace storesrc/renderer/pages/tools/ToolsPage.tsx- Use tools storesrc/renderer/pages/tools/components/ToolCard.tsx- Use tools storesrc/renderer/pages/workspaces/page.tsx- Use workspace storeOther Changes
package.json- Add zustand dependencysrc/shared/types/conversation.types.ts- Add ConversationMessage typesrc/main/index.ts- Minor updatessrc/main/services/conversation.store.service.ts- Minor updates