diff --git a/frontend/src/components/home/sections/hero-section.tsx b/frontend/src/components/home/sections/hero-section.tsx
index 32d280a1..e33dd4bd 100644
--- a/frontend/src/components/home/sections/hero-section.tsx
+++ b/frontend/src/components/home/sections/hero-section.tsx
@@ -1,7 +1,7 @@
'use client';
import { HeroVideoSection } from '@/components/home/sections/hero-video-section';
import { siteConfig } from '@/lib/home';
-import { ArrowRight, Github, X, AlertCircle } from 'lucide-react';
+import { ArrowRight, Github, X, AlertCircle, Square } from 'lucide-react';
import { FlickeringGrid } from '@/components/home/ui/flickering-grid';
import { useMediaQuery } from '@/hooks/use-media-query';
import { useState, useEffect, useRef, FormEvent } from 'react';
@@ -16,8 +16,6 @@ import { useInitiateAgentMutation } from '@/hooks/react-query/dashboard/use-init
import { useThreadQuery } from '@/hooks/react-query/threads/use-threads';
import { generateThreadName } from '@/lib/actions/threads';
import GoogleSignIn from '@/components/GoogleSignIn';
-import { Input } from '@/components/ui/input';
-import { SubmitButton } from '@/components/ui/submit-button';
import {
Dialog,
DialogContent,
@@ -32,6 +30,13 @@ import { useAccounts } from '@/hooks/use-accounts';
import { isLocalMode, config } from '@/lib/config';
import { toast } from 'sonner';
import { useModal } from '@/hooks/use-modal-store';
+import { Card, CardContent } from '@/components/ui/card';
+import { Button } from '@/components/ui/button';
+import { Send, ArrowUp, Paperclip } from 'lucide-react';
+import { Textarea } from '@/components/ui/textarea';
+import { cn } from '@/lib/utils';
+import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
+import ChatDropdown from '@/components/thread/chat-input/chat-dropdown';
// Custom dialog overlay with blur effect
const BlurredDialogOverlay = () => (
@@ -63,7 +68,6 @@ export function HeroSection() {
// Auth dialog state
const [authDialogOpen, setAuthDialogOpen] = useState(false);
- const [authError, setAuthError] = useState(null);
useEffect(() => {
setMounted(true);
@@ -124,7 +128,7 @@ export function HeroSection() {
try {
const formData = new FormData();
formData.append('prompt', inputValue.trim());
- formData.append('model_name', 'openrouter/deepseek/deepseek-chat');
+ formData.append('model_name', 'openrouter/deepseek/deepseek-chat');
formData.append('enable_thinking', 'false');
formData.append('reasoning_effort', 'low');
formData.append('stream', 'true');
@@ -174,37 +178,15 @@ export function HeroSection() {
};
// Handle Enter key press
- const handleKeyDown = (e: React.KeyboardEvent) => {
- if (e.key === 'Enter') {
+ const handleKeyDown = (e: React.KeyboardEvent) => {
+ if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
e.preventDefault(); // Prevent default form submission
e.stopPropagation(); // Stop event propagation
handleSubmit();
}
};
- // Handle auth form submission
- const handleSignIn = async (prevState: any, formData: FormData) => {
- setAuthError(null);
- try {
- // Implement sign in logic here
- const email = formData.get('email') as string;
- const password = formData.get('password') as string;
- // Add the returnUrl to the form data for proper redirection
- formData.append('returnUrl', '/dashboard');
-
- // Call your authentication function here
-
- // Return any error state
- return { message: 'Invalid credentials' };
- } catch (error) {
- console.error('Sign in error:', error);
- setAuthError(
- error instanceof Error ? error.message : 'An error occurred',
- );
- return { message: 'An error occurred during sign in' };
- }
- };
return (
@@ -260,7 +242,7 @@ export function HeroSection() {
{hero.badge}
*/}
-
-
-
+ */}
+
Suna
, your AI Employee.
@@ -298,37 +280,76 @@ export function HeroSection() {
{hero.description}
-
-
+
{/* Auth Dialog */}