From b06353217a42de399a6dff0bc32f93bac935feca Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Thu, 11 Jul 2024 10:39:54 -0700 Subject: [PATCH] hide TTS and more actions on chat reset message --- .../ChatHistory/HistoricalMessage/Actions/ActionMenu/index.jsx | 2 +- .../ChatHistory/HistoricalMessage/Actions/TTSButton/index.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/ActionMenu/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/ActionMenu/index.jsx index df575bb0c8a..de7df30f8be 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/ActionMenu/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/ActionMenu/index.jsx @@ -33,7 +33,7 @@ function ActionMenu({ chatId, forkThread, isEditing, role }) { }; }, []); - if (isEditing || role === "user") return null; + if (!chatId || isEditing || role === "user") return null; return (
diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/index.jsx index 644a57afc38..56d32e847b1 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/index.jsx @@ -16,7 +16,7 @@ export default function TTSMessage({ slug, chatId, message }) { getSettings(); }, []); - if (loading) return null; + if (!chatId || loading) return null; if (provider !== "native") return ; return ;