The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Move constants out to own file
Terry Suttone72e19d3b38f
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsxindex 5663bf14681..861f6831579 100644--- a/packages/ui/src/components/Command/AiCommand.tsx+++ b/packages/ui/src/components/Command/AiCommand.tsx@@ -11,10 +11,11 @@ import { SSE } from 'sse.js'import { Button, IconAlertCircle, IconAlertTriangle, IconCornerDownLeft, IconUser, Input } from 'ui'import { AiIcon, AiIconChat } from './Command.icons'import { CommandGroup, CommandItem } from './Command.utils'-import { COMMAND_ROUTES } from './CommandMenu'+import { useCommandMenu } from './CommandMenuProvider'import { cn } from './../../utils/cn'+import { COMMAND_ROUTES } from './Command.constants'const questions = ['How do I get started with Supabase?',diff --git a/packages/ui/src/components/Command/Command.constants.ts b/packages/ui/src/components/Command/Command.constants.tsnew file mode 100644index 00000000000..93b5618910a--- /dev/null+++ b/packages/ui/src/components/Command/Command.constants.ts@@ -0,0 +1,7 @@+export const COMMAND_ROUTES = {+ AI: 'Supabase AI',+ DOCS_SEARCH: 'Docs Search',+ THEME: 'Theme',+ AI_ASK_ANYTHING: 'Ask anything',+ AI_RLS_POLICY: 'Help me create a RLS policy',+}diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsxindex 9cc9403bb64..3460e639584 100644--- a/packages/ui/src/components/Command/CommandMenu.tsx+++ b/packages/ui/src/components/Command/CommandMenu.tsx@@ -31,14 +31,7 @@ import DashboardTableEditor from './sections/DashboardTableEditor'import CommandMenuShortcuts from './CommandMenuShortcuts'import SearchOnlyItem from './SearchOnlyItem'import SearchableStudioItems from './SearchableStudioItems'--export const COMMAND_ROUTES = {- AI: 'Supabase AI',- DOCS_SEARCH: 'Docs Search',- THEME: 'Theme',- AI_ASK_ANYTHING: 'Ask anything',- AI_RLS_POLICY: 'Help me create a RLS policy',-}+import { COMMAND_ROUTES } from './Command.constants'export const CHAT_ROUTES = [COMMAND_ROUTES.AI, // this one is temporarydiff --git a/packages/ui/src/components/Command/CommandMenuShortcuts.tsx b/packages/ui/src/components/Command/CommandMenuShortcuts.tsxindex bf0ae4581e1..6d091370050 100644--- a/packages/ui/src/components/Command/CommandMenuShortcuts.tsx+++ b/packages/ui/src/components/Command/CommandMenuShortcuts.tsx@@ -1,4 +1,5 @@import React from 'react'+import { CommandShortcut } from './Command.utils'import { useCommandMenu } from './CommandMenuProvider'