File tree Expand file tree Collapse file tree 1 file changed +21
-8
lines changed
libs/remix-ui/statusbar/src/lib/components Expand file tree Collapse file tree 1 file changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,17 @@ export default function AIStatus(props: AIStatusProps) {
2424
2525 } , [ ] )
2626
27+ const [ visible , setVisible ] = useState ( true ) ;
28+
29+ useEffect ( ( ) => {
30+ // Set a timeout to make UI message disappear after 3 seconds
31+ const timer = setTimeout ( ( ) => {
32+ setVisible ( false ) ;
33+ } , 5000 ) ;
34+
35+ return ( ) => clearTimeout ( timer ) ;
36+ } , [ ] ) ;
37+
2738 useEffect ( ( ) => {
2839 const run = async ( ) => {
2940 props . plugin . on ( 'settings' , 'copilotChoiceUpdated' , async ( isChecked ) => {
@@ -66,14 +77,16 @@ export default function AIStatus(props: AIStatusProps) {
6677 color : 'var(--ai)' ,
6778 alignItems : 'self-end' ,
6879 } } >
69- < span className = 'p-1 text-info alert alert-secondary' style = { {
70- boxShadow : "0 1px 7px var(--secondary)" ,
71- zIndex : '200' ,
72- marginRight : '1.8rem' ,
73- marginBottom : '-7px'
74- } } >
75- 👋 I'm here to help you!
76- </ span >
80+ { visible &&
81+ < span className = 'p-1 text-info alert alert-secondary' style = { {
82+ boxShadow : "0 1px 7px var(--secondary)" ,
83+ zIndex : '200' ,
84+ marginRight : '1.8rem' ,
85+ marginBottom : '-7px'
86+ } } >
87+ 👋 I'm here to help you!
88+ </ span >
89+ }
7790 < button
7891 style = { {
7992 backgroundColor : 'var(--brand-dark-blue)' ,
You can’t perform that action at this time.
0 commit comments