Add DotAI class

This commit is contained in:
Alex Gleason committed 2025-08-23 01:24:13 -05:00
1 parent 9a4c2a8cb5
commit 4df17bc17e
4 files changed
+412 -25

No files matched your search

-14
View File
@@ -1,5 +1,4 @@
import { useState, useRef, useEffect } from 'react';
import { generateId } from 'ai';
import { Button } from '@/components/ui/button';
import { Textarea } from '@/components/ui/textarea';
import { Send, Settings, Play, CloudUpload, Loader2 } from 'lucide-react';
@@ -83,7 +82,6 @@ When creating new components or pages, follow the existing patterns in the codeb
sendMessage,
stopStreaming,
clearMessages,
addMessage
} = useStreamingChat({
projectId,
projectName,
@@ -198,18 +196,6 @@ BASE_DOMAIN=nostrdeploy.com`);
clearMessages();
}, [projectId, clearMessages]);
useEffect(() => {
// Add welcome message
if (!messages.length) {
addMessage({
id: generateId(),
role: 'assistant' as const,
content: `Hello! I'm here to help you build "${projectName}". I can help you edit files, add new features, and build your Nostr website. What would you like to work on?`,
timestamp: Date.now()
});
}
}, [projectName, messages, addMessage]);
useEffect(() => {
if (scrollAreaRef.current && messages) {
// Check if user was already at or near the bottom (within 100px threshold)