From 6152f7e6bfb273f8e38a2c10416f4aae604af395 Mon Sep 17 00:00:00 2001 From: balibabu Date: Wed, 12 Aug 2026 15:45:16 +0800 Subject: [PATCH] Fix: Hide the reset button on the embedded page that is in conversation (#18153) --- web/src/components/embed-container.tsx | 24 ++++++++++++++---------- web/src/pages/agent/share/index.tsx | 1 + web/src/pages/next-chats/share/index.tsx | 1 + 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/web/src/components/embed-container.tsx b/web/src/components/embed-container.tsx index 6d31384d68..731873cce0 100644 --- a/web/src/components/embed-container.tsx +++ b/web/src/components/embed-container.tsx @@ -24,6 +24,7 @@ type EmbedContainerProps = { title: string; avatar?: string; handleReset?(): void; + hideReset?: boolean; } & PropsWithChildren; export function EmbedContainer({ @@ -31,6 +32,7 @@ export function EmbedContainer({ avatar, children, handleReset, + hideReset = false, }: EmbedContainerProps) { const appConf = useFetchAppConf(); @@ -54,16 +56,18 @@ export function EmbedContainer({
- + {hideReset || ( + + )} {children} diff --git a/web/src/pages/agent/share/index.tsx b/web/src/pages/agent/share/index.tsx index 9b1e312084..2aba50dd6a 100644 --- a/web/src/pages/agent/share/index.tsx +++ b/web/src/pages/agent/share/index.tsx @@ -121,6 +121,7 @@ const ChatContainer = () => { title={inputsData.title} avatar={inputsData.avatar} handleReset={handleReset} + hideReset={sendLoading} >
{ title={chatInfo.title} avatar={chatInfo.avatar} handleReset={removeAllMessagesExceptFirst} + hideReset={sendLoading} >