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:
Abdullah.
2026-02-09 19:29:32 +05:00
committed by GitHub
parent 7fbd50e5a0
commit 4cdb7d61b2
13 changed files with 494 additions and 113 deletions
@@ -2,10 +2,10 @@ import { AI_CHAT_INPUT_ID } from '@/ai/constants/AiChatInputId';
import { useAgentChatContextOrThrow } from '@/ai/hooks/useAgentChatContextOrThrow';
import { agentChatInputState } from '@/ai/states/agentChatInputState';
import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';
import { t } from '@lingui/core/macro';
import { useRecoilValue } from 'recoil';
import { Key } from 'ts-key-enum';
import { Button } from 'twenty-ui/input';
import { IconArrowUp } from 'twenty-ui/display';
import { RoundedIconButton } from 'twenty-ui/input';
export const SendMessageButton = () => {
const agentChatInput = useRecoilValue(agentChatInputState);
@@ -27,14 +27,10 @@ export const SendMessageButton = () => {
});
return (
<Button
hotkeys={agentChatInput && !isLoading ? ['⏎'] : undefined}
<RoundedIconButton
Icon={IconArrowUp}
onClick={() => handleSendMessage()}
disabled={!agentChatInput || isLoading}
variant="primary"
accent="blue"
size="small"
title={t`Send`}
/>
);
};