* Add custom types for queries, mutations and infinite queries.
* Migrate all queries to use the new type.
* Migrate all infinite queries to useCustomInfiniteQueryOptions.
* Migrate all mutations to use useCustomMutationOptions.
* Add type to all imports in `types` folder.
* chore: add usercentrics for consent management
* client component to make next.js happy
* address feedback
* move consent state to common
* fix import
* ensure page events are sent correctly
* add feature flag provider to ui library site
* fix ui lib 500 error
* skip in test env
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
* some early ideas
* better approach
* fix globe stuff
* add initial step
* reset and submit button for chat
* cleanup
* remove www
* more clean up
* mobile and more cleanup
* fixes
* update advanced and security
* fix project checks
* connect form
* fix reset and tidied up other things
* add layout options
* a/b test
* add offset
* add ab test
* remove www packages
* remove www
* package
* update coordinates
* feat: create ProjectCreationInitialStepSubmittedEvent
* feat: add event for capturing intention of prompting
* fix: bring pnpm-lock up to date
* fix ts errors
* fix globe
* fix globe animation
* fix ts
* remove imports and tools
* update module resolution
* global redirect
* delay rendering
* Update apps/studio/pages/new/[slug].tsx
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* take directly to v2 via project create dropdown
* move redirect to useEffect
* feat: distinguish events between initial and second step
* feat: emit an event when create project is clicked on new/v2
* fix: correct event type defs
* remove unused imports
* Various clean ups
* improvements
* Minor refactors
* clean up
* ts fixes
---------
Co-authored-by: Long Hoang <1732217+loong@users.noreply.github.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* chore: add ai assistant event docs
* fix: added more details on ai assistant suggestion events
* fix: clarify page in description
* fix: rename and re specify the events
* feat: show potential way to document event
* chore: add cron event docs
* chore: rename cron job history event
* chore: remove as typecasting and add event definitions to type union
* fix: resolve type error from potentially missing properties field in events
* fix: remove typecast
* Update imports.
* Update package-lock.json (leftover changes from previous PR).
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* start
* added panels
* remove stuff
* fixes and refinements
* clean up
* remove old assistant panel
* resizable assistant kinda
* use icon
* Add missing package
* remove canvas
* add suggestions
* updated empty state if no tables exist
* fix table condition
* Implement diffing if using assistant in sql editor
* Reinstate old assistant in SQL editor if feature preview is off
* pane size adjustment
* assistant button corners
* Add SQL snippet content to assistant if opening assistant in sql editor
* Add the necessary checks for opt in and hipaa
* revert adding snippet to assistant when opening assistant in sql editor
* Add cmd i shortcut
* Add admonitions for when disablePrompt is toggled on, and if no api key is set. Add footer note RE rate limitation
* Bump ai package in packages
* some fixes for backwards compability depending on feature preview toggled
* Rename feature preview property for new assistant
* Smol fix
* Prevent SQL snippet from running until message is finished
* only loading last message
* fix z-index
* save chat state to global state
* add debug to failed ai queries
* Add basic contextual invalidation
* Add explain code action to SQL editor
* Add link to abort ongoing queries from SqlSnippet
* Update feature preview content
* Fix
* Fix
* Fix
* Te4st
* Fix tests
* ONly show ai button within a project
* Fix PH tracking
* Beef up a bit more event tracking
* Rough fix to padding when assistant is open
* A bit more telemetry stuff
* Update prompts
* fix rls editing via assistant
* Update generate-v3.ts
prompt to get auth schema too
* Add policy satement to assistant when editing
* Address all comments
* fixc
* Fix SqlSnippet not taking full width on larger viewports
* Adjust max width
---------
Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
* Fix the types for API settings to include protocol.
* Use the protocol property in all usages of endpoints.
* Update
* Lint
* Revert changes to retrieving protocol
* Remove console.logs
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Smol tweak to consent toast on mobile
* Use useConsent hook from packages in dashboard, and remove manual calling of ConsentToast + deprecate dashboard's copy of telemetry local storage key
* Attempt to fix playwright tests
* Fix
* Init new telemetry mutations and add telemetry reset for logging out
* Add sendPageLeave on unloadBefore event in PageTelemetry
* Add sendGroupsIdentify and sendGroupsReset in PageTelemetry
* Ensure new telemetry triggers only if feature flag is enabled
* Update call to sendGroupsReset
* some fixes and ensure that telemetry opt in is true before firing telemetry events
* Ensure that telemetry events get triggered when landing on project or org
* Refactor telemetry event into RQ hook, and update to support PH
* Refactor telemetry identify into RQ hook, and update to support PH
* Refactor telemetry page into RQ hook, and update to support PH
* Clean up and deprecate lib/telemetry
* Pretty
* Add ts-ignore in docs for telemetry calls temporarily
* Add credentials include for send event, page and identify mutation hooks
* Add consent check for event and page telemetry, allow RQ mutations for those to fail silently without a toast