mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
modified: src/lib/components/layout/Sidebar.svelte
This commit is contained in:
parent
b660a8fe7f
commit
83161615a3
1 changed files with 15 additions and 1 deletions
|
|
@ -65,6 +65,7 @@
|
|||
import PinnedModelList from './Sidebar/PinnedModelList.svelte';
|
||||
import Note from '../icons/Note.svelte';
|
||||
import { slide } from 'svelte/transition';
|
||||
import { convertDeepseekChats, getImportOrigin } from '$lib/utils';
|
||||
|
||||
const BREAKPOINT = 768;
|
||||
|
||||
|
|
@ -355,7 +356,20 @@
|
|||
};
|
||||
|
||||
const importChatsHandler = async (_chats) => {
|
||||
for (const chat of _chats) {
|
||||
let chatsToImport = _chats;
|
||||
|
||||
const origin = getImportOrigin(chatsToImport);
|
||||
if (origin === 'deepseek') {
|
||||
try {
|
||||
chatsToImport = convertDeepseekChats(chatsToImport);
|
||||
} catch (error) {
|
||||
console.error('DeepSeek conversion failed', error);
|
||||
toast.error('DeepSeek 聊天转换失败');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (const chat of chatsToImport) {
|
||||
console.log(chat);
|
||||
|
||||
if (chat.chat) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue