From f7fb08014505fd79271981b187fc6c1b7d5070bd Mon Sep 17 00:00:00 2001 From: Vukasin Date: Sat, 5 Jul 2025 21:26:25 +0200 Subject: [PATCH] feat: implement new chat design --- .../components/home/sections/hero-section.tsx | 37 +++++++++++-------- .../components/thread/attachment-group.tsx | 18 +++++---- .../thread/chat-input/chat-input.tsx | 6 +-- .../thread/chat-input/file-upload-handler.tsx | 7 ++-- .../thread/chat-input/message-input.tsx | 27 +++++++------- 5 files changed, 52 insertions(+), 43 deletions(-) diff --git a/frontend/src/components/home/sections/hero-section.tsx b/frontend/src/components/home/sections/hero-section.tsx index e33dd4bd..45ffab18 100644 --- a/frontend/src/components/home/sections/hero-section.tsx +++ b/frontend/src/components/home/sections/hero-section.tsx @@ -329,21 +329,28 @@ export function HeroSection() {
- + + + + + +

Send message

+
+
diff --git a/frontend/src/components/thread/attachment-group.tsx b/frontend/src/components/thread/attachment-group.tsx index 9ceb17c6..0acd3eee 100644 --- a/frontend/src/components/thread/attachment-group.tsx +++ b/frontend/src/components/thread/attachment-group.tsx @@ -83,7 +83,7 @@ export function AttachmentGroup({ initial={{ opacity: 0, height: 0 }} animate={{ opacity: 1, height: 'auto' }} exit={{ opacity: 0, height: 0 }} - className={layout === 'inline' ? "mb-3 py-1 px-0.5" : "mt-4"} + className={layout === 'inline' ? "" : "mt-4"} /> ); } @@ -277,9 +277,9 @@ export function AttachmentGroup({ } else { // For inline layout with pre-computed data return ( -
+
{visibleFilesWithMeta.map((item, index) => ( -
+
{renderContent()} - + {/* Modal dialog to show all files - conditionally rendered based on isModalOpen state */} - + < Dialog open={isModalOpen} onOpenChange={setIsModalOpen} > @@ -481,7 +483,7 @@ export function AttachmentGroup({ })()}
- + ); } \ No newline at end of file diff --git a/frontend/src/components/thread/chat-input/chat-input.tsx b/frontend/src/components/thread/chat-input/chat-input.tsx index faac0c2a..7b9a7be4 100644 --- a/frontend/src/components/thread/chat-input/chat-input.tsx +++ b/frontend/src/components/thread/chat-input/chat-input.tsx @@ -238,12 +238,12 @@ export const ChatInput = forwardRef( {})} + onExpand={onExpandToolPreview || (() => { })} agentName={agentName} isVisible={showToolPreview} /> { @@ -265,7 +265,7 @@ export const ChatInput = forwardRef( }} >
- + )} + Attach diff --git a/frontend/src/components/thread/chat-input/message-input.tsx b/frontend/src/components/thread/chat-input/message-input.tsx index 1d84e0f8..129c87f3 100644 --- a/frontend/src/components/thread/chat-input/message-input.tsx +++ b/frontend/src/components/thread/chat-input/message-input.tsx @@ -123,9 +123,9 @@ export const MessageInput = forwardRef( }; return ( -
+
-
+