mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
chore: add an initial disclaimer to Unleash AI (#8482)
https://linear.app/unleash/issue/2-2853/add-a-disclaimer-to-the-unleash-ai-chat-window Adds a small, initial disclaimer to Unleash AI chat. ![image](https://github.com/user-attachments/assets/0097bb92-9724-4cef-922e-4c97770fe8e1)
This commit is contained in:
parent
ffcfe85575
commit
5b1e875131
@ -14,6 +14,7 @@ import { AIChatInput } from './AIChatInput';
|
|||||||
import { AIChatMessage } from './AIChatMessage';
|
import { AIChatMessage } from './AIChatMessage';
|
||||||
import { AIChatHeader } from './AIChatHeader';
|
import { AIChatHeader } from './AIChatHeader';
|
||||||
import { Resizable } from 'component/common/Resizable/Resizable';
|
import { Resizable } from 'component/common/Resizable/Resizable';
|
||||||
|
import { AIChatDisclaimer } from './AIChatDisclaimer';
|
||||||
|
|
||||||
const AI_ERROR_MESSAGE = {
|
const AI_ERROR_MESSAGE = {
|
||||||
role: 'assistant',
|
role: 'assistant',
|
||||||
@ -176,9 +177,9 @@ export const AIChat = () => {
|
|||||||
<StyledAIChatContainer>
|
<StyledAIChatContainer>
|
||||||
<StyledResizable
|
<StyledResizable
|
||||||
handlers={['top-left', 'top', 'left']}
|
handlers={['top-left', 'top', 'left']}
|
||||||
minSize={{ width: '270px', height: '200px' }}
|
minSize={{ width: '270px', height: '250px' }}
|
||||||
maxSize={{ width: '90vw', height: '90vh' }}
|
maxSize={{ width: '90vw', height: '90vh' }}
|
||||||
defaultSize={{ width: '320px', height: '450px' }}
|
defaultSize={{ width: '320px', height: '500px' }}
|
||||||
onResize={() => scrollToEnd({ onlyIfAtEnd: true })}
|
onResize={() => scrollToEnd({ onlyIfAtEnd: true })}
|
||||||
>
|
>
|
||||||
<StyledChat>
|
<StyledChat>
|
||||||
@ -187,6 +188,7 @@ export const AIChat = () => {
|
|||||||
onClose={() => setOpen(false)}
|
onClose={() => setOpen(false)}
|
||||||
/>
|
/>
|
||||||
<StyledChatContent>
|
<StyledChatContent>
|
||||||
|
<AIChatDisclaimer />
|
||||||
<AIChatMessage from='assistant'>
|
<AIChatMessage from='assistant'>
|
||||||
Hello, how can I assist you?
|
Hello, how can I assist you?
|
||||||
</AIChatMessage>
|
</AIChatMessage>
|
||||||
|
19
frontend/src/component/ai/AIChatDisclaimer.tsx
Normal file
19
frontend/src/component/ai/AIChatDisclaimer.tsx
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { styled } from '@mui/material';
|
||||||
|
|
||||||
|
const StyledDisclaimer = styled('aside')(({ theme }) => ({
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
textAlign: 'center',
|
||||||
|
width: '100%',
|
||||||
|
color: theme.palette.secondary.dark,
|
||||||
|
fontSize: theme.fontSizes.smallerBody,
|
||||||
|
marginBottom: theme.spacing(2),
|
||||||
|
}));
|
||||||
|
|
||||||
|
export const AIChatDisclaimer = () => (
|
||||||
|
<StyledDisclaimer>
|
||||||
|
By using this assistant you accept that all data you share in this chat
|
||||||
|
can be shared with OpenAI
|
||||||
|
</StyledDisclaimer>
|
||||||
|
);
|
Loading…
Reference in New Issue
Block a user