Redesign AI chat and add pre-existing prompts. (#17787)
Redesigned AI-chat based on the following provided design. <p align="center"> <img src="https://github.com/user-attachments/assets/f10ebbd2-9ee9-402f-b246-6e8f8cedbd53" width="225" /> </p> --------- Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
+7
-5
@@ -1,10 +1,11 @@
|
||||
import { useAIChatFileUpload } from '@/ai/hooks/useAIChatFileUpload';
|
||||
import { agentChatSelectedFilesState } from '@/ai/states/agentChatSelectedFilesState';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import React, { useRef } from 'react';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
import { IconPaperclip } from 'twenty-ui/display';
|
||||
import { Button } from 'twenty-ui/input';
|
||||
import { IconPlus } from 'twenty-ui/display';
|
||||
import { IconButton } from 'twenty-ui/input';
|
||||
|
||||
const StyledFileUploadContainer = styled.div`
|
||||
display: flex;
|
||||
@@ -44,13 +45,14 @@ export const AgentChatFileUploadButton = () => {
|
||||
onChange={handleFileInputChange}
|
||||
/>
|
||||
|
||||
<Button
|
||||
variant="secondary"
|
||||
<IconButton
|
||||
variant="tertiary"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
fileInputRef.current?.click();
|
||||
}}
|
||||
Icon={IconPaperclip}
|
||||
Icon={IconPlus}
|
||||
ariaLabel={t`Attach files`}
|
||||
/>
|
||||
</StyledFileUploadContainer>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user