WIP: resuming

This commit is contained in:
Danny Avila 2025-12-04 08:57:13 -05:00
parent 6bb2fac0ec
commit 6fb59957d0
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
8 changed files with 478 additions and 85 deletions

View file

@ -7,7 +7,7 @@ import { Constants, buildTree } from 'librechat-data-provider';
import type { TMessage } from 'librechat-data-provider';
import type { ChatFormValues } from '~/common';
import { ChatContext, AddedChatContext, useFileMapContext, ChatFormProvider } from '~/Providers';
import { useChatHelpers, useAddedResponse, useAdaptiveSSE } from '~/hooks';
import { useChatHelpers, useAddedResponse, useAdaptiveSSE, useResumeOnLoad } from '~/hooks';
import ConversationStarters from './Input/ConversationStarters';
import { useGetMessagesByConvoId } from '~/data-provider';
import MessagesView from './Messages/MessagesView';
@ -54,6 +54,9 @@ function ChatView({ index = 0 }: { index?: number }) {
useAdaptiveSSE(rootSubmission, chatHelpers, false, index);
useAdaptiveSSE(addedSubmission, addedChatHelpers, true, index + 1);
// Auto-resume if navigating back to conversation with active job
useResumeOnLoad(conversationId, chatHelpers, index);
const methods = useForm<ChatFormValues>({
defaultValues: { text: '' },
});