Improve AI-chat design to match the one provided in Figma (#17816)

Fixed colors, gaps, component nesting, alignment to match Figma.
This commit is contained in:
Abdullah.
2026-02-09 23:28:25 +05:00
committed by GitHub
parent 5ccf18fdf5
commit ef1464db73
9 changed files with 83 additions and 137 deletions
@@ -4,12 +4,13 @@ import { agentChatInputState } from '@/ai/states/agentChatInputState';
import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';
import { useRecoilValue } from 'recoil';
import { Key } from 'ts-key-enum';
import { IconArrowUp } from 'twenty-ui/display';
import { IconArrowUp, IconPlayerStop } from 'twenty-ui/display';
import { RoundedIconButton } from 'twenty-ui/input';
export const SendMessageButton = () => {
const agentChatInput = useRecoilValue(agentChatInputState);
const { handleSendMessage, isLoading } = useAgentChatContextOrThrow();
const { handleSendMessage, handleStop, isLoading, isStreaming } =
useAgentChatContextOrThrow();
useHotkeysOnFocusedElement({
keys: [Key.Enter],
@@ -26,9 +27,20 @@ export const SendMessageButton = () => {
},
});
if (isStreaming) {
return (
<RoundedIconButton
Icon={IconPlayerStop}
size="medium"
onClick={() => handleStop()}
/>
);
}
return (
<RoundedIconButton
Icon={IconArrowUp}
size="medium"
onClick={() => handleSendMessage()}
disabled={!agentChatInput || isLoading}
/>