diff --git a/apps/studio/components/interfaces/App/FeaturePreview/AssistantV2Preview.tsx b/apps/studio/components/interfaces/App/FeaturePreview/AssistantV2Preview.tsx new file mode 100644 index 00000000000..a10d9531f87 --- /dev/null +++ b/apps/studio/components/interfaces/App/FeaturePreview/AssistantV2Preview.tsx @@ -0,0 +1,55 @@ +import Image from 'next/image' + +import { useParams } from 'common' +import { Markdown } from 'components/interfaces/Markdown' +import { BASE_PATH } from 'lib/constants' +import { detectOS } from 'lib/helpers' + +export const AssistantV2Preview = () => { + const os = detectOS() + const { ref } = useParams() + + return ( +
+ We're changing the way our AI Assistant integrates with the dashboard by making it shared + and accessible universally across the whole dashboard. This hopes to make using the + Assistant as a supporting tool more seamless while you build your project. +
++ The Assistant will also be automatically provided with contexts depending on where you are + in the dashboard to generate more relevant and higher quality outputs. You may also ask for + insights on your own data apart from help with SQL and Postgres! +
++ We believe that this should further lower the barrier of working with databases especially + if you're not well acquainted with Postgres (yet!), so please do feel free to let us know + what you think in the attached GitHub discussion above! +
+Enabling this preview will:
+- We're providing an additional alternative UX to creating database functions through the - dashboard with the integration of our AI Assistant that you might have seen in the Auth - Policies section. -
-- This preview also shares an improved Assistant interface where you may provide the Assistant - with contexts in hopes to generate more relevant and higher quality outputs. Contexts that - you may provide include specific schemas, and / or specific tables from your database. -
-- We'd hope to use this as a consistent pattern throughout the dashboard eventually if this - feature preview proves itself to benefit most of our users, so as usual please do feel free - to let us know what you think if the attached GitHub discussion above! -
-Enabling this preview will:
-Edit policy
Edit function
- {enableAssistantV2 && ( + {isAssistantV2Enabled && (Assistant
-- Please verify all responses as the Assistant can make mistakes -
- )} - {pendingChatReply && ( -{suggestions.title}
} ++ This is the Supabase assistant which will help you create, debug and modify tables, + policies, functions and more. You can even use it to query your data using just your + words. It looks like we have a blank canvas though, so what are you looking to + build? Here are some ideas. +
+{qs.description}
+- {entity !== undefined && !!entityContext ? ( - <> - Need help with updating this{' '} - {entityContext.name} - > - ) : ( - <> - How can I help you - {!!entityContext ? ( - <> - {' '} - with{' '} - - {entityContext.id === 'rls-policies' - ? entityContext.label - : `Database ${entityContext.label}`} - - > - ) : ( - ' today' - )} - > - )} - ? -
-Database Entity
-- Inform about what you're working with -
-Schemas
-- Share table definitions in the selected schemas -
-Tables
-- Select specific tables to share definitions for -
-- {selectedSchemas.length} schemas selected: -
-- {selectedTables.length} tables selected: -
-+ The Assistant is in Alpha and your prompts might be rate limited +
+ )} +
- {errorText}
-
- ))
- ) : (
- {error.error}
- )} -Are you sure you want to run this query?
-- {results.length} rows - {results.length >= 100 && ` (Limited to only 100 rows)`} -
-Success. No rows returned.
-CTRL
- )} -How can I help you today?
+{props.children}
- },
- }}
- >
- {content}
- {props.children}
+ },
+ }}
+ >
+ {content}
+ This query contains write operations. Are you sure you want to execute it?
+
+ {errorText}
+
+ ))}
+ {error.error}
++ {results.length} rows + {results.length >= 100 && ` (Limited to only 100 rows)`} +
+Success. No rows returned.
+