Skip to content

Commit de9f9a0

Browse files
UI Cleanup (#2270)
Remove FineTuningBanner remove AgentAlert for first time users
1 parent 43b6ece commit de9f9a0

File tree

6 files changed

+1
-172
lines changed

6 files changed

+1
-172
lines changed

frontend/src/components/SettingsSidebar/index.jsx

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { useTranslation } from "react-i18next";
2121
import showToast from "@/utils/toast";
2222
import System from "@/models/system";
2323
import Option from "./MenuOption";
24-
import { FineTuningAlert } from "@/pages/FineTuning/Banner";
2524

2625
export default function SettingsSidebar() {
2726
const { t } = useTranslation();
@@ -178,7 +177,6 @@ export default function SettingsSidebar() {
178177
</div>
179178
</div>
180179
</div>
181-
<FineTuningAlert />
182180
</>
183181
);
184182
}

frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AgentMenu/index.jsx

+1-72
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { useEffect, useRef, useState } from "react";
22
import { Tooltip } from "react-tooltip";
3-
import { At, Flask, X } from "@phosphor-icons/react";
4-
import ModalWrapper from "@/components/ModalWrapper";
5-
import { useModal } from "@/hooks/useModal";
3+
import { At } from "@phosphor-icons/react";
64
import { useIsAgentSessionActive } from "@/utils/chat/agent";
75

86
export default function AvailableAgentsButton({ showing, setShowAgents }) {
@@ -107,7 +105,6 @@ export function AvailableAgents({
107105
</div>
108106
</div>
109107
</div>
110-
{showing && <FirstTimeAgentUser />}
111108
</>
112109
);
113110
}
@@ -116,71 +113,3 @@ export function useAvailableAgents() {
116113
const [showAgents, setShowAgents] = useState(false);
117114
return { showAgents, setShowAgents };
118115
}
119-
120-
const SEEN_FT_AGENT_MODAL = "anythingllm_seen_first_time_agent_modal";
121-
function FirstTimeAgentUser() {
122-
const { isOpen, openModal, closeModal } = useModal();
123-
useEffect(() => {
124-
function firstTimeShow() {
125-
if (!window) return;
126-
if (!window.localStorage.getItem(SEEN_FT_AGENT_MODAL)) openModal();
127-
}
128-
firstTimeShow();
129-
}, []);
130-
131-
const dismiss = () => {
132-
closeModal();
133-
window.localStorage.setItem(SEEN_FT_AGENT_MODAL, 1);
134-
};
135-
136-
return (
137-
<ModalWrapper isOpen={isOpen}>
138-
<div className="relative w-[500px] max-w-2xl max-h-full">
139-
<div className="relative bg-main-gradient rounded-lg shadow">
140-
<div className="flex items-center gap-x-1 justify-between p-4 border-b rounded-t border-gray-600">
141-
<Flask className="text-green-400" size={24} weight="fill" />
142-
<h3 className="text-xl font-semibold text-white">
143-
You just discovered Agents!
144-
</h3>
145-
<button
146-
onClick={dismiss}
147-
type="button"
148-
className="transition-all duration-300 text-gray-400 bg-transparent hover:border-white/60 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
149-
data-modal-hide="staticModal"
150-
>
151-
<X className="text-gray-300 text-lg" />
152-
</button>
153-
</div>
154-
<div className="p-6 space-y-6 flex h-full w-full">
155-
<div className="w-full flex flex-col gap-y-4">
156-
<p className="text-white/80 text-xs md:text-sm">
157-
Agents are your LLM, but with special abilities that{" "}
158-
<u>do something beyond chatting with your documents</u>.
159-
<br />
160-
<br />
161-
Now you can use agents for real-time web search and scraping,
162-
saving documents to your browser, summarizing documents, and
163-
more.
164-
</p>
165-
<p className="text-green-300/60 text-xs md:text-sm">
166-
This feature is currently early access and fully custom agents
167-
with custom integrations & code execution will be in a future
168-
update.
169-
</p>
170-
</div>
171-
</div>
172-
<div className="flex w-full justify-between items-center p-6 space-x-2 border-t rounded-b border-gray-600">
173-
<div />
174-
<button
175-
onClick={dismiss}
176-
type="button"
177-
className="px-4 py-2 rounded-lg text-white hover:bg-stone-900 transition-all duration-300"
178-
>
179-
Continue
180-
</button>
181-
</div>
182-
</div>
183-
</div>
184-
</ModalWrapper>
185-
);
186-
}

frontend/src/index.css

-28
Original file line numberDiff line numberDiff line change
@@ -767,34 +767,6 @@ does not extend the close button beyond the viewport. */
767767
}
768768
}
769769

770-
.top-banner {
771-
animation: popTop 500ms forwards;
772-
}
773-
774-
@keyframes popTop {
775-
0% {
776-
top: -3.5rem;
777-
}
778-
779-
100% {
780-
top: 0px;
781-
}
782-
}
783-
784-
.rm-top-banner {
785-
animation: rmPopTop 500ms forwards;
786-
}
787-
788-
@keyframes rmPopTop {
789-
0% {
790-
top: 0px;
791-
}
792-
793-
100% {
794-
top: -3.5rem;
795-
}
796-
}
797-
798770
/* Math/Katex formatting to prevent duplication of content on screen */
799771
.katex-html[aria-hidden="true"] {
800772
display: none;

frontend/src/pages/FineTuning/Banner/index.jsx

-66
This file was deleted.

frontend/src/pages/Main/index.jsx

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import PasswordModal, { usePasswordModal } from "@/components/Modals/Password";
55
import { isMobile } from "react-device-detect";
66
import { FullScreenLoader } from "@/components/Preloader";
77
import UserMenu from "@/components/UserMenu";
8-
import { FineTuningAlert } from "../FineTuning/Banner";
98

109
export default function Main() {
1110
const { loading, requiresAuth, mode } = usePasswordModal();
@@ -23,7 +22,6 @@ export default function Main() {
2322
<DefaultChatContainer />
2423
</div>
2524
</UserMenu>
26-
<FineTuningAlert />
2725
</>
2826
);
2927
}

frontend/src/pages/WorkspaceChat/index.jsx

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Workspace from "@/models/workspace";
66
import PasswordModal, { usePasswordModal } from "@/components/Modals/Password";
77
import { isMobile } from "react-device-detect";
88
import { FullScreenLoader } from "@/components/Preloader";
9-
import { FineTuningAlert } from "../FineTuning/Banner";
109

1110
export default function WorkspaceChat() {
1211
const { loading, requiresAuth, mode } = usePasswordModal();
@@ -50,7 +49,6 @@ function ShowWorkspaceChat() {
5049
{!isMobile && <Sidebar />}
5150
<WorkspaceChatContainer loading={loading} workspace={workspace} />
5251
</div>
53-
<FineTuningAlert />
5452
</>
5553
);
5654
}

0 commit comments

Comments
 (0)