|
|
@ -24,6 +24,17 @@ export default function AIStatus(props: AIStatusProps) { |
|
|
|
|
|
|
|
|
|
|
|
}, []) |
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [visible, setVisible] = useState(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
// Set a timeout to make UI message disappear after 3 seconds
|
|
|
|
|
|
|
|
const timer = setTimeout(() => { |
|
|
|
|
|
|
|
setVisible(false); |
|
|
|
|
|
|
|
}, 5000); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return () => clearTimeout(timer); |
|
|
|
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
const run = async () => { |
|
|
|
const run = async () => { |
|
|
|
props.plugin.on('settings', 'copilotChoiceUpdated', async (isChecked) => { |
|
|
|
props.plugin.on('settings', 'copilotChoiceUpdated', async (isChecked) => { |
|
|
@ -66,14 +77,16 @@ export default function AIStatus(props: AIStatusProps) { |
|
|
|
color: 'var(--ai)', |
|
|
|
color: 'var(--ai)', |
|
|
|
alignItems: 'self-end', |
|
|
|
alignItems: 'self-end', |
|
|
|
}}> |
|
|
|
}}> |
|
|
|
<span className='p-1 text-info alert alert-secondary' style={{ |
|
|
|
{ visible && |
|
|
|
boxShadow: "0 1px 7px var(--secondary)", |
|
|
|
<span className='p-1 text-info alert alert-secondary' style={{ |
|
|
|
zIndex: '200', |
|
|
|
boxShadow: "0 1px 7px var(--secondary)", |
|
|
|
marginRight: '1.8rem', |
|
|
|
zIndex: '200', |
|
|
|
marginBottom: '-7px' |
|
|
|
marginRight: '1.8rem', |
|
|
|
}}> |
|
|
|
marginBottom: '-7px' |
|
|
|
👋 I'm here to help you! |
|
|
|
}}> |
|
|
|
</span> |
|
|
|
👋 I'm here to help you! |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
} |
|
|
|
<button |
|
|
|
<button |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
backgroundColor: 'var(--brand-dark-blue)', |
|
|
|
backgroundColor: 'var(--brand-dark-blue)', |
|
|
|