From df6e18bbdf89382e78b75582d33cf1ec8cd82787 Mon Sep 17 00:00:00 2001 From: geoffsee <> Date: Fri, 30 May 2025 22:27:01 -0400 Subject: [PATCH] Refactor `ClientChatStore` into separate stores for modularity and improve maintainability. --- src/components/chat/Chat.tsx | 4 +- src/components/chat/input-menu/InputMenu.tsx | 2 +- src/components/chat/messages/ChatMessages.tsx | 4 +- .../chat/messages/MessageBubble.tsx | 4 +- src/stores/ClientChatStore.ts | 229 +----------------- src/stores/MessagesStore.ts | 35 +++ src/stores/ModelStore.ts | 35 +++ src/stores/StreamStore.ts | 121 +++++++++ src/stores/UIStore.ts | 21 ++ 9 files changed, 228 insertions(+), 227 deletions(-) create mode 100644 src/stores/MessagesStore.ts create mode 100644 src/stores/ModelStore.ts create mode 100644 src/stores/StreamStore.ts create mode 100644 src/stores/UIStore.ts diff --git a/src/components/chat/Chat.tsx b/src/components/chat/Chat.tsx index 9331951..c2e0671 100644 --- a/src/components/chat/Chat.tsx +++ b/src/components/chat/Chat.tsx @@ -25,8 +25,8 @@ const Chat = observer(({ height, width }) => { width={width} gap={0} > -