From b17ee7d83925c87688f308e4599dbd320a017fe4 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Fri, 23 Oct 2026 03:58:00 +0200 Subject: [PATCH] fix: chat menu Copy shows while chat export is not allowed (#32960) * fix: chat menu Copy shows while chat export is not allowed Users without the chat export permission get no Download entry in the chat menu, but Copy was still there and copied the whole chat as text, the same as the plain text download. Copy is now hidden as well while chat export is not allowed. Refs #32830 * fix: chat menu opens empty once Copy is hidden With Copy hidden for users without the chat export permission, a temporary chat with no artifacts that is not scrolled down had nothing left in its chat menu, so the button opened an empty dropdown. The button is now hidden in that case and shows again as soon as the menu has an entry. Refs #32830 --- src/lib/components/chat/Navbar.svelte | 3 +- src/lib/components/layout/Navbar/Menu.svelte | 36 ++++++++++---------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/lib/components/chat/Navbar.svelte b/src/lib/components/chat/Navbar.svelte index af8d771eba..fb7540f94a 100644 --- a/src/lib/components/chat/Navbar.svelte +++ b/src/lib/components/chat/Navbar.svelte @@ -4,6 +4,7 @@ import { WEBUI_NAME, + artifactContents, banners, chatId, config, @@ -127,7 +128,7 @@ {title || chat?.chat?.title || $i18n.t('New Chat')} - {#if shareEnabled && chat && (chat.id || $temporaryChatEnabled)} + {#if shareEnabled && chat && (chat.id || $temporaryChatEnabled) && (scrollToTop || ($artifactContents ?? []).length > 0 || (!readOnly && !$temporaryChatEnabled) || $user?.role === 'admin' || ($user?.permissions?.chat?.export ?? true))}