forked from open-webui/open-webui
		
	chore: refac
This commit is contained in:
		
							parent
							
								
									f30d16a3fd
								
							
						
					
					
						commit
						cc49e0d10f
					
				
					 11 changed files with 239 additions and 397 deletions
				
			
		| 
						 | 
				
			
			@ -8,10 +8,11 @@
 | 
			
		|||
	import auto_render from 'katex/dist/contrib/auto-render.mjs';
 | 
			
		||||
	import 'katex/dist/katex.min.css';
 | 
			
		||||
 | 
			
		||||
	import { config, db, modelfiles, settings, user } from '$lib/stores';
 | 
			
		||||
	import { chats, config, db, modelfiles, settings, user } from '$lib/stores';
 | 
			
		||||
	import { tick } from 'svelte';
 | 
			
		||||
 | 
			
		||||
	import toast from 'svelte-french-toast';
 | 
			
		||||
	import { getChatList, updateChatById } from '$lib/apis/chats';
 | 
			
		||||
 | 
			
		||||
	export let chatId = '';
 | 
			
		||||
	export let sendPrompt: Function;
 | 
			
		||||
| 
						 | 
				
			
			@ -262,10 +263,12 @@
 | 
			
		|||
			return message;
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		$db.updateChatById(chatId, {
 | 
			
		||||
		await updateChatById(localStorage.token, chatId, {
 | 
			
		||||
			messages: messages,
 | 
			
		||||
			history: history
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		await chats.set(await getChatList(localStorage.token));
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	const showPreviousMessage = async (message) => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue