refac
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { settings, chatId, WEBUI_NAME, models } from '$lib/stores';
|
||||
import { settings, chatId, WEBUI_NAME, models, config } from '$lib/stores';
|
||||
import { convertMessagesToHistory, createMessagesList } from '$lib/utils';
|
||||
|
||||
import { getChatByShareId, cloneSharedChatById } from '$lib/apis/chats';
|
||||
@@ -61,7 +61,12 @@
|
||||
//////////////////////////
|
||||
|
||||
const loadSharedChat = async () => {
|
||||
await models.set(await getModels(localStorage.token, $settings?.directConnections ?? null));
|
||||
await models.set(
|
||||
await getModels(
|
||||
localStorage.token,
|
||||
$config?.features?.enable_direct_connetions && ($settings?.directConnections ?? null)
|
||||
)
|
||||
);
|
||||
await chatId.set($page.params.id);
|
||||
chat = await getChatByShareId(localStorage.token, $chatId).catch(async (error) => {
|
||||
await goto('/');
|
||||
|
||||
Reference in New Issue
Block a user