mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +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. 
This commit is contained in:
		
							parent
							
								
									ffcfe85575
								
							
						
					
					
						commit
						5b1e875131
					
				@ -14,6 +14,7 @@ import { AIChatInput } from './AIChatInput';
 | 
			
		||||
import { AIChatMessage } from './AIChatMessage';
 | 
			
		||||
import { AIChatHeader } from './AIChatHeader';
 | 
			
		||||
import { Resizable } from 'component/common/Resizable/Resizable';
 | 
			
		||||
import { AIChatDisclaimer } from './AIChatDisclaimer';
 | 
			
		||||
 | 
			
		||||
const AI_ERROR_MESSAGE = {
 | 
			
		||||
    role: 'assistant',
 | 
			
		||||
@ -176,9 +177,9 @@ export const AIChat = () => {
 | 
			
		||||
        <StyledAIChatContainer>
 | 
			
		||||
            <StyledResizable
 | 
			
		||||
                handlers={['top-left', 'top', 'left']}
 | 
			
		||||
                minSize={{ width: '270px', height: '200px' }}
 | 
			
		||||
                minSize={{ width: '270px', height: '250px' }}
 | 
			
		||||
                maxSize={{ width: '90vw', height: '90vh' }}
 | 
			
		||||
                defaultSize={{ width: '320px', height: '450px' }}
 | 
			
		||||
                defaultSize={{ width: '320px', height: '500px' }}
 | 
			
		||||
                onResize={() => scrollToEnd({ onlyIfAtEnd: true })}
 | 
			
		||||
            >
 | 
			
		||||
                <StyledChat>
 | 
			
		||||
@ -187,6 +188,7 @@ export const AIChat = () => {
 | 
			
		||||
                        onClose={() => setOpen(false)}
 | 
			
		||||
                    />
 | 
			
		||||
                    <StyledChatContent>
 | 
			
		||||
                        <AIChatDisclaimer />
 | 
			
		||||
                        <AIChatMessage from='assistant'>
 | 
			
		||||
                            Hello, how can I assist you?
 | 
			
		||||
                        </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