forked from open-webui/open-webui
fix: new chat load
This commit is contained in:
parent
e116016543
commit
6a2c1600f5
5 changed files with 37 additions and 21 deletions
|
@ -1,5 +1,8 @@
|
|||
<script lang="ts">
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { goto } from '$app/navigation';
|
||||
import { chatId } from '$lib/stores';
|
||||
|
||||
export let title: string = 'Ollama Web UI';
|
||||
</script>
|
||||
|
@ -14,8 +17,10 @@
|
|||
<div class="pr-2">
|
||||
<button
|
||||
class=" cursor-pointer p-1 flex dark:hover:bg-gray-700 rounded-lg transition"
|
||||
on:click={() => {
|
||||
location.href = '/';
|
||||
on:click={async () => {
|
||||
console.log('newChat');
|
||||
goto('/');
|
||||
await chatId.set(uuidv4());
|
||||
}}
|
||||
>
|
||||
<div class=" m-auto self-center">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue