diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsx index dc3d1c21b8..417637801c 100644 --- a/studio/frontend/src/components/assistant-ui/thread.tsx +++ b/studio/frontend/src/components/assistant-ui/thread.tsx @@ -210,13 +210,28 @@ const ThreadScrollToBottom: FC = () => { }; const ThreadWelcome: FC<{ hideComposer?: boolean }> = ({ hideComposer }) => { + const [currentEmoji, setCurrentEmoji] = useState("large sloth drink.png"); + + useEffect(() => { + const hour = new Date().getHours(); + if (hour >= 6 && hour < 12) setCurrentEmoji("large sloth drink.png"); + else if (hour >= 12 && hour < 17) setCurrentEmoji("sloth magnify final.png"); + else if (hour >= 17 && hour < 21) setCurrentEmoji("sloth shy large.png"); + else setCurrentEmoji("unsloth-gem.png"); + }, []); + + const currentEmojiSrc = + currentEmoji === "unsloth-gem.png" + ? `/${currentEmoji}` + : `/Sloth emojis/${currentEmoji}`; + return (
Sloth mascot