mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
fix: new chat load
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { goto, invalidateAll } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import { user, db, chats, showSettings, chatId } from '$lib/stores';
|
||||
@@ -168,8 +170,10 @@
|
||||
<div class="px-2.5 flex justify-center space-x-2">
|
||||
<button
|
||||
class="flex-grow flex justify-between rounded-md px-3 py-1.5 my-2 hover:bg-gray-900 transition"
|
||||
on:click={() => {
|
||||
location.href = '/';
|
||||
on:click={async () => {
|
||||
goto('/');
|
||||
|
||||
await chatId.set(uuidv4());
|
||||
// createNewChat();
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user