Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(cmdk): carry over search query when selecting ai

Greg Richardson539854a11943
diff --git a/packages/ui/src/components/Command/AiCommand.tsx b/packages/ui/src/components/Command/AiCommand.tsx
index 676405dac00..f737be5cb45 100644
--- a/packages/ui/src/components/Command/AiCommand.tsx
+++ b/packages/ui/src/components/Command/AiCommand.tsx
@@ -200,13 +200,6 @@ const AiCommand = () => {
}
}, [])
- const showActions =
- !search &&
- currentPage === COMMAND_ROUTES.AI_RLS_POLICY &&
- !isResponding &&
- !isLoading &&
- promptData.length > 0
-
return (
<div onClick={(e) => e.stopPropagation()}>
<div className="relative mb-[70px] py-4 overflow-y-auto overflow-hidden max-h-[720px]">
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 18a9639045f..e9af9c8b85a 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -168,7 +168,7 @@ const CommandMenu = () => {
<CommandItem
type="command"
onSelect={() => {
- handleSetPages([...pages, COMMAND_ROUTES.AI], false)
+ handleSetPages([...pages, COMMAND_ROUTES.AI], true)
}}
forceMount
>