Просмотр исходного кода

Update apps/app/src/features/openai/client/components/AiAssistant/Sidebar/ThreadList.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Yuki Takei 9 месяцев назад
Родитель
Сommit
b62733194f

+ 1 - 2
apps/app/src/features/openai/client/components/AiAssistant/Sidebar/ThreadList.tsx

@@ -28,8 +28,7 @@ export const ThreadList: React.FC = () => {
       await deleteThread({ aiAssistantId, threadRelationId });
       toastSuccess(t('ai_assistant_substance.toaster.thread_deleted_success'));
 
-      mutateAssistantThreadData();
-      mutateRecentThreads();
+      await Promise.all([mutateAssistantThreadData(), mutateRecentThreads()]);
 
       // Close if the thread to be deleted is open in right sidebar
       if (aiAssistantSidebarData?.isOpened && aiAssistantSidebarData?.threadData?._id === threadRelationId) {