The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
import { Button } from 'ui'
import { Admonition } from 'ui-patterns/Admonition'
import { AIOptInModal } from './AIOptInModal'
interface AIAssistantMetadataWarningProps {
visible: boolean
onVisibleChange: (visible: boolean) => void
showMetadataWarning: boolean
updatedOptInSinceMCP: boolean
aiOptInLevel: 'disabled' | 'schema' | 'full' | string | undefined
}
export const AIAssistantMetadataWarning = ({
visible,
onVisibleChange,
showMetadataWarning,
updatedOptInSinceMCP,
aiOptInLevel,
}: AIAssistantMetadataWarningProps) => (
<>
{showMetadataWarning && (
<Admonition
type="default"
title={
!updatedOptInSinceMCP
? 'The Assistant has just been updated to help you better!'
: aiOptInLevel === 'disabled'
? 'Project metadata is currently not shared'
: 'Limited metadata is shared to the Assistant'
}
description={
!updatedOptInSinceMCP
? 'You may now opt-in to share schema metadata and even logs for better results'
: aiOptInLevel === 'disabled'
? 'The Assistant can provide better answers if you opt-in to share schema metadata.'
: aiOptInLevel === 'schema'
? 'Sharing query data in addition to schema can further improve responses. Update AI settings to enable this.'
: ''
}
className="border-0 border-b rounded-none bg-background"
>
<Button className="w-fit mt-4" onClick={() => onVisibleChange(true)}>
Permission settings
</Button>
</Admonition>
)}
<AIOptInModal visible={visible} onCancel={() => onVisibleChange(false)} />
</>
)