1
1
import { useEffect , useRef , useState } from "react" ;
2
2
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" ;
6
4
import { useIsAgentSessionActive } from "@/utils/chat/agent" ;
7
5
8
6
export default function AvailableAgentsButton ( { showing, setShowAgents } ) {
@@ -107,7 +105,6 @@ export function AvailableAgents({
107
105
</ div >
108
106
</ div >
109
107
</ div >
110
- { showing && < FirstTimeAgentUser /> }
111
108
</ >
112
109
) ;
113
110
}
@@ -116,71 +113,3 @@ export function useAvailableAgents() {
116
113
const [ showAgents , setShowAgents ] = useState ( false ) ;
117
114
return { showAgents, setShowAgents } ;
118
115
}
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
- }
0 commit comments