From: Aleksander Grygier Date: Sat, 6 Dec 2025 12:29:15 +0000 (+0100) Subject: webui: Stop generation from chat sidebar (#17806) X-Git-Tag: upstream/0.0.7446~141 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=a28e3c7567ae2f064d663db7019ca2d5da73df55;p=pkg%2Fggml%2Fsources%2Fllama.cpp webui: Stop generation from chat sidebar (#17806) * feat: Add stop generation button for Conversation Item * chore: update webui build output --- diff --git a/tools/server/public/index.html.gz b/tools/server/public/index.html.gz index a9dba62a..2db04e95 100644 Binary files a/tools/server/public/index.html.gz and b/tools/server/public/index.html.gz differ diff --git a/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebar.svelte b/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebar.svelte index a113acbc..1d313e28 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebar.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebar.svelte @@ -8,6 +8,7 @@ import * as AlertDialog from '$lib/components/ui/alert-dialog'; import Input from '$lib/components/ui/input/input.svelte'; import { conversationsStore, conversations } from '$lib/stores/conversations.svelte'; + import { chatStore } from '$lib/stores/chat.svelte'; import ChatSidebarActions from './ChatSidebarActions.svelte'; const sidebar = Sidebar.useSidebar(); @@ -98,6 +99,10 @@ await goto(`#/chat/${id}`); } + + function handleStopGeneration(id: string) { + chatStore.stopGenerationForChat(id); + } @@ -132,6 +137,7 @@ onSelect={selectConversation} onEdit={handleEditConversation} onDelete={handleDeleteConversation} + onStop={handleStopGeneration} /> {/each} diff --git a/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarConversationItem.svelte b/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarConversationItem.svelte index 82685f83..bf2fa4f9 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarConversationItem.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatSidebar/ChatSidebarConversationItem.svelte @@ -1,6 +1,7 @@