From bc623cdd303b06ea2abc5cced040ef7592379654 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Sun, 13 Jul 2025 08:21:53 -0600 Subject: [PATCH 1/3] stop chat --- apps/web/src/api/buster_rest/chats/requestsV2.ts | 2 +- .../ChatContainer/ChatContent/ChatInput/useChatInputFlow.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web/src/api/buster_rest/chats/requestsV2.ts b/apps/web/src/api/buster_rest/chats/requestsV2.ts index 33546f28d..acb8811ae 100644 --- a/apps/web/src/api/buster_rest/chats/requestsV2.ts +++ b/apps/web/src/api/buster_rest/chats/requestsV2.ts @@ -6,5 +6,5 @@ export const createNewChat = async (props: ChatCreateRequest) => { }; export const stopChat = async ({ chatId }: { chatId: string }) => { - return mainApiV2.patch(`/chats/${chatId}`, { stop: true }).then((res) => res.data); + return mainApiV2.delete(`/chats/${chatId}/cancel`).then((res) => res.data); }; diff --git a/apps/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/useChatInputFlow.ts b/apps/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/useChatInputFlow.ts index 3b702bf48..864855182 100644 --- a/apps/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/useChatInputFlow.ts +++ b/apps/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/useChatInputFlow.ts @@ -135,8 +135,10 @@ export const useChatInputFlow = ({ const onStopChat = useMemoizedFn(() => { if (!chatId) return; onStopChatContext({ chatId, messageId: currentMessageId }); - textAreaRef.current?.focus(); - textAreaRef.current?.select(); + setTimeout(() => { + textAreaRef.current?.focus(); + textAreaRef.current?.select(); + }, 100); }); return useMemo( From 12acbc426445dc991d485aefdb65c8d35a4937a6 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Sun, 13 Jul 2025 08:25:21 -0600 Subject: [PATCH 2/3] Update buster.code-workspace --- .vscode/buster.code-workspace | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.vscode/buster.code-workspace b/.vscode/buster.code-workspace index 162400a94..689cebe60 100644 --- a/.vscode/buster.code-workspace +++ b/.vscode/buster.code-workspace @@ -1,23 +1,23 @@ { "folders": [ - { "path": "./apps/api" }, - { "path": "./apps/electric-server" }, - { "path": "./apps/server" }, - { "path": "./apps/trigger" }, - { "path": "./apps/web" }, - { "path": "./packages/access-controls" }, - { "path": "./packages/ai" }, - { "path": "./packages/data-source" }, - { "path": "./packages/database" }, - { "path": "./packages/rerank" }, - { "path": "./packages/server-shared" }, - { "path": "./packages/slack" }, - { "path": "./packages/stored-values" }, - { "path": "./packages/supabase" }, - { "path": "./packages/test-utils" }, - { "path": "./packages/typescript-config" }, - { "path": "./packages/vitest-config" }, - { "path": "./packages/web-tools" } + { "path": "../apps/api" }, + { "path": "../apps/electric-server" }, + { "path": "../apps/server" }, + { "path": "../apps/trigger" }, + { "path": "../apps/web" }, + { "path": "../packages/access-controls" }, + { "path": "../packages/ai" }, + { "path": "../packages/data-source" }, + { "path": "../packages/database" }, + { "path": "../packages/rerank" }, + { "path": "../packages/server-shared" }, + { "path": "../packages/slack" }, + { "path": "../packages/stored-values" }, + { "path": "../packages/supabase" }, + { "path": "../packages/test-utils" }, + { "path": "../packages/typescript-config" }, + { "path": "../packages/vitest-config" }, + { "path": "../packages/web-tools" } ], "settings": { "editor.defaultFormatter": "biomejs.biome", From f84bf8e3d1570a0a89e546f819dc84ca8b41b967 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Sun, 13 Jul 2025 08:28:11 -0600 Subject: [PATCH 3/3] disable check --- .../ui/inputs/InputTextAreaButton.tsx | 28 ++++++++----------- .../ChatContent/ChatInput/ChatInput.tsx | 4 +-- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/apps/web/src/components/ui/inputs/InputTextAreaButton.tsx b/apps/web/src/components/ui/inputs/InputTextAreaButton.tsx index b293f417d..8fe8cb60c 100644 --- a/apps/web/src/components/ui/inputs/InputTextAreaButton.tsx +++ b/apps/web/src/components/ui/inputs/InputTextAreaButton.tsx @@ -108,29 +108,25 @@ const SubmitButton: React.FC<{ onSubmitPreflight: () => void; onStop?: () => void; }> = React.memo(({ disabled, sendIcon, loading, loadingIcon, onSubmitPreflight, onStop }) => { - const memoizedPrefix = useMemo(() => { - return ( + const prefix = ( +
-
- {sendIcon} -
-
- {loadingIcon} -
+ className={`absolute inset-0 transition-all duration-300 ease-out ${loading ? 'scale-80 opacity-0' : 'scale-100 opacity-100'}`}> + {sendIcon}
- ); - }, [loading, sendIcon, loadingIcon]); +
+ {loadingIcon} +
+
+ ); return (