Project modals (#190)

* added the project create and select modals

* Added logo and link to home page

* minor changes to side bar

* added import json and blank template options

* added website like home page

* change homepage to be more like website

* fixed landing page text box

* minor size changes to the home page

* added prebuilt agents section

* Minor changes to the prebuilt agent card

* removed the project selection and new project options from side bar

* fixed prebuilt agents

* fixed import json

* my assistants has pagination

* add dark mode support to home page

* addressed review comments

* increase build agents textbox lines

* fixed PR comments

* move prebuilt assistant under build view

* minor changes to home page

* minor changes to home page

* removed my assistants from side bar

* removed sidebar items

* fixed review comments

* fixed review comments

* Add "use client" directive to project-creation-utils.ts

This file uses localStorage and calls server actions directly, requiring client-side execution.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix import of pipeline agents

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
arkml 2025-08-11 23:46:30 +05:30 committed by GitHub
parent 10045c742d
commit 9a980f2f9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 1092 additions and 164 deletions

View file

@ -0,0 +1,78 @@
'use client';
import { forwardRef, TextareaHTMLAttributes } from 'react';
import { Textarea } from '@/components/ui/textarea';
import { Send } from 'lucide-react';
import clsx from 'clsx';
interface TextareaWithSendProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'> {
value: string;
onChange: (value: string) => void;
onSubmit: () => void;
isSubmitting?: boolean;
submitDisabled?: boolean;
placeholder?: string;
className?: string;
rows?: number;
autoFocus?: boolean;
autoResize?: boolean;
}
export const TextareaWithSend = forwardRef<HTMLTextAreaElement, TextareaWithSendProps>(
({
value,
onChange,
onSubmit,
isSubmitting = false,
submitDisabled = false,
placeholder,
className,
rows = 3,
autoFocus = false,
autoResize = false,
...props
}, ref) => {
return (
<div className="relative">
<Textarea
ref={ref}
value={value}
onChange={(e) => onChange(e.target.value)}
placeholder={placeholder}
className={clsx("pr-14", className)}
rows={rows}
autoFocus={autoFocus}
autoResize={autoResize}
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
onSubmit();
}
}}
{...props}
/>
<div className="absolute right-3 bottom-3">
<button
onClick={onSubmit}
disabled={isSubmitting || submitDisabled || !value.trim()}
className={clsx(
"rounded-full p-2 transition-all duration-200",
value.trim()
? "bg-indigo-50 hover:bg-indigo-100 text-indigo-700 dark:bg-indigo-900/50 dark:hover:bg-indigo-800/60 dark:text-indigo-300"
: "bg-gray-100 dark:bg-gray-800 text-gray-400 dark:text-gray-500",
isSubmitting ? "opacity-50" : "hover:scale-105 active:scale-95"
)}
>
{isSubmitting ? (
<div className="animate-spin rounded-full h-5 w-5 border-b-2 border-current"></div>
) : (
<Send size={18} />
)}
</button>
</div>
</div>
);
}
);
TextareaWithSend.displayName = 'TextareaWithSend';