The AI Assistant component provides AI-powered suggestions for creating and improving view schemas. It allows users to describe their desired view in natural language and generates corresponding schema definitions.
You can customize the AI Assistant appearance and behavior:
Copy
<AIPromptPanel theme="light" placeholderText="Describe your view here..." suggestedPrompts={[ "Create a login form", "Build a product catalog table", "Generate a user profile view" ]} maxTokens={1000}/>
import { AIPromptPanel } from '@repo/view-builder/ai/AIPromptPanel';const promptTemplates = [ { name: 'Contact Form', prompt: 'Create a contact form with name, email, subject, and message fields. Add appropriate validation for each field.' }, { name: 'Product Table', prompt: 'Build a table for managing products with columns for ID, name, category, price, and inventory. Include sorting and filtering options.' }, { name: 'User Profile', prompt: 'Generate a detail view for user profiles with sections for personal information, contact details, and account settings.' }];function TemplatedAIPanel() { return <AIPromptPanel promptTemplates={promptTemplates} />;}