diff --git a/api/app/chatgpt-custom.js b/api/app/chatgpt-custom.js index a356ba4b1a..9eabb80ccd 100644 --- a/api/app/chatgpt-custom.js +++ b/api/app/chatgpt-custom.js @@ -17,7 +17,7 @@ const customClient = async ({ text, progressCallback, convo, promptPrefix, chatG clientOptions.chatGptLabel = chatGptLabel; - if (promptPrefix.length > 0) { + if (promptPrefix?.length > 0) { clientOptions.promptPrefix = promptPrefix; } diff --git a/client/src/components/Messages/HoverButtons.jsx b/client/src/components/Messages/HoverButtons.jsx index b88c69470d..860023ed2f 100644 --- a/client/src/components/Messages/HoverButtons.jsx +++ b/client/src/components/Messages/HoverButtons.jsx @@ -4,16 +4,16 @@ import EditIcon from '../svg/EditIcon'; export default function HoverButtons({ user }) { return ( - -
- {user && ( - - )} - {/* + )} + {/* */} -
+ ); -} \ No newline at end of file +} diff --git a/client/src/components/Messages/Message.jsx b/client/src/components/Messages/Message.jsx index 9413f21856..ecb929b902 100644 --- a/client/src/components/Messages/Message.jsx +++ b/client/src/components/Messages/Message.jsx @@ -14,7 +14,6 @@ export default function Message({ }) { const { isSubmitting } = useSelector((state) => state.submit); const [abortScroll, setAbort] = useState(false); - const [isHovering, setIsHovering] = useState(false); const notUser = sender.toLowerCase() !== 'user'; const blinker = isSubmitting && last && notUser; @@ -32,14 +31,6 @@ export default function Message({ } }; - const handleMouseOver = () => { - setIsHovering(true); - }; - - const handleMouseOut = () => { - setIsHovering(false); - }; - const props = { className: 'w-full border-b border-black/10 dark:border-gray-900/50 text-gray-800 bg-white dark:text-gray-100 group dark:bg-gray-800' @@ -49,7 +40,7 @@ export default function Message({ chatgpt: 'rgb(16, 163, 127)', chatgptBrowser: 'rgb(25, 207, 207)', bingai: '', - sydney: '', + sydney: '' }; const isBing = sender === 'bingai' || sender === 'sydney'; @@ -65,7 +56,11 @@ export default function Message({ if ((notUser && backgroundColor) || isBing) { icon = (
{isBing ? : } @@ -84,12 +79,14 @@ export default function Message({
- - {icon} + + {typeof icon === 'string' && icon.match(/[^\u0000-\u007F]+/) ? ( + {icon} + ) : ( + icon + )}
@@ -109,9 +106,7 @@ export default function Message({
)}
-
- {isHovering && } -
+
diff --git a/client/src/mobile.css b/client/src/mobile.css index e633ecaea3..78fff342c5 100644 --- a/client/src/mobile.css +++ b/client/src/mobile.css @@ -36,7 +36,7 @@ left: calc(-100%);; top: 0; bottom: 0; - max-width: 400px; + max-width: 320px; width: calc(100% - 60px); opacity: 0; }