mirror of
https://github.com/supabase/supabase.git
synced 2026-09-22 13:37:53 +08:00
c33d255eba
<img width="1062" height="712" alt="image" src="https://github.com/user-attachments/assets/44c82e00-94b4-405a-b2ef-cbc08401c4db" /> <img width="1583" height="962" alt="image" src="https://github.com/user-attachments/assets/b19b9fd8-24b1-48d6-8b31-11fba9911b9a" /> ## What kind of change does this PR introduce? UI refinement. ## What is the current behavior? The assistant sidebar and Explorer chat use different empty states. ## What is the new behavior? Share a centered empty state with chat-focused prompts, use-case icons, and a “Use your own agent” footer. Simplify prompt cards and align Explorer Home styling. ## Additional context Studio typecheck, targeted ESLint, and Prettier pass. E2E selectors updated; browser verification pending. Local build stopped after showing no progress during compilation. I have read CONTRIBUTING.md. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Redesigned Explorer and AI Assistant onboarding with project-focused chat prompts. * Added personalized chat template icons and updated suggested actions. * Added an option to connect and use an external agent through Claude, OpenAI, or Cursor. * Improved chat composer placement and empty-chat guidance. * **Style** * Action cards now support layouts without descriptions and adjust alignment automatically. * **Tests** * Updated end-to-end coverage for the revised assistant interface. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
import {
|
|
BookOpen,
|
|
Bug,
|
|
Database,
|
|
Gauge,
|
|
NotebookText,
|
|
ShieldCheck,
|
|
type LucideIcon,
|
|
} from 'lucide-react'
|
|
|
|
export type ChatTemplate = {
|
|
title: string
|
|
icon: LucideIcon
|
|
initialMessage: string
|
|
}
|
|
|
|
export const CHAT_TEMPLATES: ChatTemplate[] = [
|
|
{
|
|
title: 'Generate sample data',
|
|
icon: Database,
|
|
initialMessage: 'Generate sample data for a blog with users, posts, and comments tables.',
|
|
},
|
|
{
|
|
title: 'Set up RLS policies',
|
|
icon: ShieldCheck,
|
|
initialMessage: 'Create RLS policies to ensure users can only access their own data.',
|
|
},
|
|
{
|
|
title: 'Build a notebook',
|
|
icon: NotebookText,
|
|
initialMessage: 'Build me a notebook that tracks weekly signups and active users.',
|
|
},
|
|
]
|
|
|
|
export const codeSnippetPrompts = [
|
|
{
|
|
title: 'Explain code',
|
|
icon: BookOpen,
|
|
prompt: 'Explain what this code does and how it works',
|
|
},
|
|
{
|
|
title: 'Improve code',
|
|
icon: Gauge,
|
|
prompt: 'How can I improve this code for better performance and readability?',
|
|
},
|
|
{
|
|
title: 'Debug issues',
|
|
icon: Bug,
|
|
prompt: 'Help me debug any potential issues with this code',
|
|
},
|
|
]
|