diff --git a/tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessages.svelte b/tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessages.svelte index 4042afdcb8..020873dc6e 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessages.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessages.svelte @@ -2,15 +2,14 @@ import { ChatMessage } from '$lib/components/app'; import { DatabaseService } from '$lib/services/database'; import { - activeConversation, continueAssistantMessage, deleteMessage, editAssistantMessage, editMessageWithBranching, editUserMessagePreserveResponses, - navigateToSibling, regenerateMessageWithBranching } from '$lib/stores/chat.svelte'; + import { activeConversation, navigateToSibling } from '$lib/stores/conversations.svelte'; import { getMessageSiblings } from '$lib/utils/branching'; interface Props { diff --git a/tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte b/tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte index 175730a349..3c8df964ae 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte @@ -19,15 +19,17 @@ INITIAL_SCROLL_DELAY } from '$lib/constants/auto-scroll'; import { - activeMessages, - activeConversation, - deleteConversation, dismissErrorDialog, errorDialog, isLoading, sendMessage, stopGeneration } from '$lib/stores/chat.svelte'; + import { + activeMessages, + activeConversation, + deleteConversation + } from '$lib/stores/conversations.svelte'; import { config } from '$lib/stores/settings.svelte'; import { supportsVision, diff --git a/tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreenProcessingInfo.svelte b/tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreenProcessingInfo.svelte index ecab2321b6..28f1356f28 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreenProcessingInfo.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreenProcessingInfo.svelte @@ -2,7 +2,8 @@ import { PROCESSING_INFO_TIMEOUT } from '$lib/constants/processing-info'; import { useProcessingState } from '$lib/hooks/use-processing-state.svelte'; import { slotsService } from '$lib/services/slots'; - import { isLoading, activeMessages, activeConversation } from '$lib/stores/chat.svelte'; + import { isLoading } from '$lib/stores/chat.svelte'; + import { activeMessages, activeConversation } from '$lib/stores/conversations.svelte'; import { config } from '$lib/stores/settings.svelte'; const processingState = useProcessingState(); diff --git a/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsImportExportTab.svelte b/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsImportExportTab.svelte index d92a53684f..14c9faea2d 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsImportExportTab.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsImportExportTab.svelte @@ -5,7 +5,7 @@ import { DatabaseService } from '$lib/services/database'; import type { ExportedConversations } from '$lib/types/database'; import { createMessageCountMap } from '$lib/utils/conversation-utils'; - import { chatStore } from '$lib/stores/chat.svelte'; + import { conversationsStore } from '$lib/stores/conversations.svelte'; let exportedConversations = $state([]); let importedConversations = $state([]); @@ -138,7 +138,7 @@ await DatabaseService.importConversations(selectedData); - await chatStore.loadConversations(); + await conversationsStore.loadConversations(); importedConversations = selectedConversations; showImportSummary = true; diff --git a/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebar.svelte b/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebar.svelte index bb3a6c50f3..3f6a699c3f 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebar.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebar.svelte @@ -11,7 +11,7 @@ conversations, deleteConversation, updateConversationName - } from '$lib/stores/chat.svelte'; + } from '$lib/stores/conversations.svelte'; import ChatSidebarActions from './ChatSidebarActions.svelte'; const sidebar = Sidebar.useSidebar(); diff --git a/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarConversationItem.svelte b/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarConversationItem.svelte index 51692c8cfd..6a05766f4a 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarConversationItem.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarConversationItem.svelte @@ -1,7 +1,8 @@ diff --git a/tools/server/webui/src/routes/chat/[id]/+page.svelte b/tools/server/webui/src/routes/chat/[id]/+page.svelte index bca064a977..172629bcc1 100644 --- a/tools/server/webui/src/routes/chat/[id]/+page.svelte +++ b/tools/server/webui/src/routes/chat/[id]/+page.svelte @@ -3,13 +3,12 @@ import { page } from '$app/state'; import { afterNavigate } from '$app/navigation'; import { ChatScreen } from '$lib/components/app'; + import { isLoading, stopGeneration, syncLoadingStateForChat } from '$lib/stores/chat.svelte'; import { - chatStore, activeConversation, - isLoading, - stopGeneration, - activeMessages - } from '$lib/stores/chat.svelte'; + activeMessages, + loadConversation + } from '$lib/stores/conversations.svelte'; import { selectModel, modelOptions, selectedModelId } from '$lib/stores/models.svelte'; let chatId = $derived(page.params.id); @@ -67,9 +66,10 @@ } (async () => { - const success = await chatStore.loadConversation(chatId); - - if (!success) { + const success = await loadConversation(chatId); + if (success) { + syncLoadingStateForChat(chatId); + } else { await goto('#/'); } })();