[FIX] Hide TTS and more actions on chat reset message ()

hide TTS and more actions on chat reset message
This commit is contained in:
Sean Hatfield 2024-07-11 11:05:25 -07:00 committed by GitHub
parent 85e5866be6
commit 881c4bc4de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions
frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions
ActionMenu
TTSButton

View file

@ -33,7 +33,7 @@ function ActionMenu({ chatId, forkThread, isEditing, role }) {
};
}, []);
if (isEditing || role === "user") return null;
if (!chatId || isEditing || role === "user") return null;
return (
<div className="mt-2 -ml-0.5 relative" ref={menuRef}>

View file

@ -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 <AsyncTTSMessage slug={slug} chatId={chatId} />;
return <NativeTTSMessage message={message} />;