* Move typescript version definition to pnpm-workspace.
* Bump typescript to 5.9.
* Minor fixes to satisfy the compiler.
---------
Co-authored-by: Raúl Barroso <code@raulb.dev>
* Attempt to address Type instantiation is excessively deep and possibly infinite build error
* Attempt to address Type instantiation is excessively deep and possibly infinite build issue
* Nit
* feat: alternate search index for nimbus
Create an alternate search index for Nimbus that filters out
feature-flagged pages (equivalent to setting all feature flags to
false).
Notes:
- Creates two new DB tables, `page_nimbus` and `page_section_nimbus`,
which are filtered versions of `page` and `page_section`
- Makes `nimbus` versions of all the DB search functions
- Refactored the embedding upload script. Changes to make it faster (got
annoyed by how slow it was when testing...), incorporate retries, and
produce better summary logs.
- Upload script, when run with the environment variable
ENABLED_FEATURES_OVERRIDE_DISABLE_ALL, produces and uploads the
alternate search index
- Changed all the search calls in frontend/API to check for
`isFeatureEnabled('search:fullIndex')` to determine whether to search
the full or alternate index
* ci: produce nimbus search indexes on merge
* fix: turn full search index on
* Nudge feedback widget, move request to bedrock
* Fix the response object
* Remove an import to deleted file.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* fix: warning message on upgrade guards
When users are blocked from an upgrade because they have objects that
need to be dropped, the message in the warning is incorrect. It asks
users to "drop these extensions". But they're not extensions, they're
user-defined tables, foreign keys, etc. This will cause confusion.
Here we use a different messaging when users need to drop their objects.
* chore: prettier
This change:
- Updates the clippy prompt to encourage it to list its sources
- Parses and extracts source links from AI responses to display them as clickable links in the UI
- Adds tests for the source parsing functionality
* Bump vite version.
* Rename and bump the vercel/flags dependency.
* Bump all versions of esbuild to one.
* Bump image-size.
* Bump fastify.
* Bump prismjs.
* Don't build libpg-query package.
* Use the WASM build of libpg-query in ai-commands.
* Fix missing mdast type.
* fix: wasm loading in ai-commands tests
* fix: better polyfill
* Make the sql-to-rest page to be client-side only.
---------
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
* Bump all testing libs to force babel to upgrade itself.
* Remove react-hooks package, it's included in @testing-library/react.
* Add await to all useEvent calls.
* Remove duplicate babel/helpers.
* Deduplicate babel/core.
* Bump vite to non-vuln version.
* Bump estree-util-value-to-estree.
* Set overrides for vite/esbuild packages, they're not used in production, low risk of something breaking.
* Bump vitest.
* Remove lodash.template from design-system.
* Forgot to run pnpm.
* Copy the design-system app into a new one for ui-library.
* Remove unneeded content.
* Add supabase config.
* Cleanup the css.
* Add bunch of packages.
* Cleanup the registry.
* Regenerate the registry.
* Add needed components for documenting components.
* Add the pages for the components.
* Fix the RegistryBlock.
* Various fixes.
* Add a turbo definition for ui-library.
* Rename Remix to React Router.
* Reorder the pages for all frameworks.
* Remove the bottom pager.
* Fix the pages and command menu.
* Various fixes.
* Minor fixes.
* Add ai editor rules.
* Various fixes.
* Add local supabase env vars.
* Try to fix a package error.
* Bunch of various fixes.
* Fix lint errors.
* Bump vite to v6 to get the newest esbuild.
* Bump tsx to get the newest esbuild.
* Fix lodash version.
* Make the www app use the catalog version of next.
* Bump the sql-formatter dependency.
* Add a function formatQuery which is a wrapper around sql-formatter.
* Replace all formatSQL features to use the new function formatSql.
* Remove unneeded RQ for formatting.
* Small fix.
* fix: bump auth-js version to v2.67.3
* chore: add supabase/auth and supabase/dashboard as codeowners
* Revert "chore: add supabase/auth and supabase/dashboard as codeowners"
This reverts commit 57fc5776bab8e657b00cccee0d472fe237bcf739.
* bump supabase-js version
* import user type from single gotrue
* fix auth-js version in studio
* remove auth-js dep in studio
* fix ts
* use catalog versions
* fix ts
* Bump realtime-js version to avoid having 2 versions.
* Add @supabase/realtime-js to the pnpm catalog.
* upgrade realtime-js
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Add next to pnpm catalog and use that next version from all apps and packages.
* Remove vite direct dependency.
* Set the @types/node to version 20.
* Stabilize supports-color by adding it in the main package.json. This will make it appear in all packages that have it as optional.
* Use built-in matchers for vitest in @testing-library/jest-dom.
* Add libpg-query as a dependency to docs.
* Remove nextjs-node-loader for the built-in external packages feature on nextjs.
* Clean up extra comment.
* Fix some missing and duplicate dependencies.
* Fix the types for jest in ai-commands package.
* Replace all npm commands with pnpm. Add pnpm files and workspace links.
* Fix rimraf to work with pnpm.
* Refactor the github actions to work with pnpm.
* Delete package-lock.json.
* Fix the tailwind configs to not include node_modules.
* Fix random files.
* Add preinstall scripts to all packages.
* Fix the Dockerfile to work with pnpm.
* Update the DEVELOPERS documentation.
* Check if pg_cron supports seconds
* Add cron parser
* Lock file
* Update prompt to handle seconds
* Various fixes for the createCronJobSheet.
* Remove extra code.
---------
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>
* Hook up RLS to new assistant if feature flag is enabled
* Reset conversation if opening a different entity
* Add prompt to use alter policy if policy definition is provided
* Remove console log
* Add alpha notice
* Close assistant via cmd i if not focused on monaco
* Add edit with assistant CTA for database functions
* Attach existing function definition when editing a function to prompt
* Leave comments
* Small refactor
* Init AiAssistantPanel
* Temp
* Temp
* iterating on assistant ux
* More spiking
* Tweaking...
* Moar tweaking..
* Even more tweaking
* Tweek
* More tweaks
* Final tweaking...
* TWEAK
* Spelling
* Fix
* Assistant error handling and small bug fix in context for message
* Add feature flag
* Fix
* Address all feedback
* Minor
* Inital setup
* Add suggest feature to the RLS Assistant
* Add AI button
* Use existing policies in AI editor
* Remove old feature preview
* Cleanup
* Tooltip
* Update
* Change panel width
* Fix type
* Fix types again
* Flag cleanup
* Add tooltip
* Cleanup
* Add a clear history button
* Add all missing libraries in the packages/apps.
* Add all missing Vitest imports to the tests.
* Add some missing exports to ui.
* Fix the admonition export.
* Fix various minor bugs.
* Migrate the ui package to use vitest.
* Update to 4o-mini
* Package lock
* Copy packagelock from master, use specific model version
* Fix the package.lock.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* chore: libpg-query types
* feat: improved rls ai tests
* feat: simplify assertitions for sql expressions
* refactor: split ai logic into separate files
* feat(rls-ai): test select, insert, update, delete policies
* feat: adds withMetadata wrapper for failed tests
* chore: remove custom libpg-query types
* feat(rls-ai): make tests concurrent
* fix(rls-ai): rules for 'using' and 'with check'
* feat(rls-ai): discourages restrictive policies
* feat(ai): makes withMetadata util sync or async
* refactor(ai): moves withMetadata to generic test utils
* feat(rls-ai): test joined table
* feat(rls-ai): test mfa
* chore(ai): make all tests concurrent
* fix(ai): chatSql function rename in studio
* refactor(ai): isolate logic into separate files
* chore(ai): remove trailing comma in tsconfig
* chore(ai): remove unused dep
* Reset some of the package versions to the versions from master.
* chore(ai): remove unused imports
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Remove feature preview for the conversational AI for SQL editor.
* Remove all code related to the previous implementation of editor ai.
* Update the snapshots for the ai commands.
* Remove unneeded code from the ai panel.
* Show the diff bar when debugging.
* Convert the updateEditor function into a callback.
* Simplify the debugging functionality by using react state instead of react context.
* Erase the AI disclaimer when formatting code as modification.
* Add a button to clear the chat history.
* Add a API endpoint for generating queries for the SQL editor.
* Merge all multiline props.
* Add a new component for diff actions.
* Copy components for the AI panel.
* Add useChat hook.
* Add a feature preview for the this feature. The preview is dependent on the feature flag.
* Reorder the nesting in the SQL editor to accomodate the AI assistant.
* Try to fit both AI assistants in the SQL editor, available via a feature preview.
* Refactor the SQL editor to make the diff work correctly in all cases.
* Minor fixes for the old AI feature.
* Fix the debug functionality to work with both assistants.
* Fix some copy-paste leftovers.
* Remove unneeded code.
* Make the icons softer.
* Fix the name of the panel component.
* Fix console.logs.
* Add overflow to the AI assistant.
* surface opt in config in ai settings button
* Skip diffing if editor is empty
* Add selected state when selecting a message to insert/replace code
* Add sample prompts
* Add SQL ai dislaimer when replacing code
* Light mode action bar nudges
* Add text for the feature preview.
* lang nudges
* Hide the command suggestions for now.
* Set the discussion url to undefined.
* Don't add the disclaimer twice.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
* Add a new function to ai-commands package.
* Add a new API route to all three apps.
* Refactor the Command component to use the new URL.
* Resort the imports.
* refactor: ai sql logic to common package
* feat: ai sql tests
* feat: test rls policy ai chat assistant
* refactor: jest env loading
* feat(ai): improve sql title and description quality
* fix: ai message role type
* Move the new files to a separate package.
* Remove a forgotten console.log.
* Migrate the tests to use snapshots and commit the snapshots.
* Separate the functions which require edge runtime to be exported via /edge subpath.
* Bust the turbo cache when one of the deps has been rebuilt.
* chore: fix package main/type references
* fix: package lock out of sync
* fix: ai sql debugging to fix typos
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>