mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
* Create QueryBlock component which will be a shared component used in AI Assistant and Reports * Deprecate AIAssistantPanel/SqlSnippet.ts * Fix user messages not getting persisted, only assistant messages * Add loading state to for query results in QueryBlock + hide block view configuration if query block is not chart * Address feedback * Fix TS * fix double border --------- Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
35 lines
639 B
TypeScript
35 lines
639 B
TypeScript
import { SupportedAssistantEntities } from './AIAssistant.types'
|
|
|
|
export const ASSISTANT_SUPPORT_ENTITIES: {
|
|
id: SupportedAssistantEntities
|
|
label: string
|
|
name: string
|
|
}[] = [
|
|
{ id: 'rls-policies', label: 'RLS Policies', name: 'RLS policy' },
|
|
{ id: 'functions', label: 'Functions', name: 'database function' },
|
|
]
|
|
|
|
export const SAFE_FUNCTIONS = [
|
|
'count(',
|
|
'sum(',
|
|
'avg(',
|
|
'min(',
|
|
'max(',
|
|
'coalesce(',
|
|
'nullif(',
|
|
'current_timestamp',
|
|
'current_date',
|
|
'length(',
|
|
'lower(',
|
|
'upper(',
|
|
'trim(',
|
|
'substring(',
|
|
'to_char(',
|
|
'to_date(',
|
|
'extract(',
|
|
'date(',
|
|
'date_trunc(',
|
|
'string_agg(',
|
|
'in (',
|
|
]
|