Commit Graph
22 Commits
Author SHA1 Message Date
Prasad 22ff5e0fa5 19719-File name updated to resolve clone issue (#19720)
File name updated to resolve clone issue
2023-12-14 12:17:25 -03:30
Ivan Vasilov a72f60ff61 chore: Remove unused stores (#19637)
* Remove DatabaseStore and AppStore.

* Remove ForeignTableStore.

* Remove MaterializedViewStore.

* Cleanup FunctionsStore.

* Remove project functions store.

* Fix a misspell error on master.

* Remove columns, policies and functions stores from the meta store.
2023-12-13 15:37:25 +01:00
1245ee7236 db design now saving messages to supabase db (#19380)
* First

* Fix the parsing of SQL.

* Get thread data action

* Remove old page

* Wait for data to complete

* SSR everywhere

* Remove unused

* Add monaco settings

* update loaders

* Add sorting

* supress hydration warnings

* Fix profile layout

* more server action action

* fixes

* Update page.tsx

* Update actions.ts

* Update AssistantChatForm.tsx

* init

* add polling

* Update actions.ts

* redirect to message id

* init

* Update SchemaFlow.tsx

* Add latest message to thread record

* Fix object object on new thread load

* Fix build

* Prettier

* Fix type errors for build

* Add proper loaders

* Remove badger

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2023-12-11 21:08:40 -03:30
Ivan Vasilov efa055f068 fix: RLS Editor with Streaming AI - second attempt (#19462)
* Reapply all changes from the reverted PR.

* Move the API route to pages folder.

* Turn off outputFileTracing.
2023-12-06 15:54:22 +01:00
Kevin Grüneberg d6b7c1b7ba Revert "feat: Add streaming responses to the new RLS Editor (#19304)" (#19439)
This reverts commit a2b01e0bc5.
2023-12-05 16:50:26 +00:00
Ivan Vasilov a2b01e0bc5 feat: Add streaming responses to the new RLS Editor (#19304)
* Add vercel/ai. Commit additional next types.

* Add a API route in /app for streaming responses.

* Make the components work with streaming response.

* Add a dummy page to /app folder to fix a linking bug.

* Fix the dummy page.

* Fix the dummy page again.

* Add an empty layout to the app folder.

* Make the code snippets in the chat read-only.

* Remove queries and mutations for suggest.

* Reset the chat when closing the panel.

* Make the AI instructions a bit better.

* Don't render empty code blocks.

* Try to use remark for rendering the code. Style fixes for CodeBlock in AI assistant panel.

* Fix the styling of the definitions when sending them to OpenAI.

* Fix the css styling of the messages and code blocks.

* Move the suggest API route from app to pages folder.

* Revert the change for app API routes.

* Make the API route look like the rest of the API routes.

* Use Pre instead of Code because the <code> tags aren't working if between spans.

* Minor leftovers.

* Revert to using app route handlers.

* Change the wording on the diff header.

* Add nextjs types.

* Fix a missing import.

* Move AssistantChatForm back to db-new.

* Fix a build error.

* Rename the suggest route to assistant.

* Fix Joshen's comments.
2023-12-05 16:05:02 +01:00
7abc9d24c4 Chore/more server actions (#19379)
* First

* Fix the parsing of SQL.

* Get thread data action

* Remove old page

* Wait for data to complete

* SSR everywhere

* Remove unused

* Add monaco settings

* update loaders

* Add sorting

* supress hydration warnings

* Fix profile layout

* more server action action

* fixes

* Update page.tsx

* Update actions.ts

* Update AssistantChatForm.tsx

* init

* add polling

* Update actions.ts

* redirect to message id

* Update page.tsx

* Update page.tsx

* handle run loading states with use client state with valtio

* reduce first load JS

* test action v1

* test action v2

* server action test 3

* test action 4

* test action 5

* test 6

* test 7

* test 7

* test 8

* test 9

* test 10

* test 11

* TEST 12

* TEST 13

* try and make it work

* Update page.tsx

* Update actions.ts

* redirect added in

* Update page.tsx

* Update SchemaFlow.tsx

* Update SchemaFlowHandler.tsx

* 14

* Update SchemaFlow.tsx

* move parse tables to client

* a11y fixes

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2023-12-03 21:01:14 -03:30
a5ffe1e693 Chore/remove react query (#19332)
* First

* Fix the parsing of SQL.

* Get thread data action

* Remove old page

* Wait for data to complete

* SSR everywhere

* Remove unused

* Add monaco settings

* update loaders

* Add sorting

* supress hydration warnings

* Fix profile layout

* more server action action

* fixes

* Update page.tsx

* Update actions.ts

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2023-12-01 15:41:51 -03:30
Ivan Vasilov f102168588 fix: Ignore other types of statements when parsing the SQL query (#19343)
Allow other types of statements in the SQL query, but only createStatement will be type-safe and taken into consideration.
2023-11-30 18:23:19 -03:30
Jonathan Summers-Muir 903be591de schema visualizer styles moved to UI package (#19313)
* init

* tidy
2023-12-01 04:41:33 +08:00
Jonathan Summers-MuirandTerry Sutton 5ef9784506 chore: added pattern UI for assistant input (#19294)
* chore: added pattern for input

* migrated whole form over

* Update packages/ui/src/patterns/AssistantChatForm.tsx

* Update packages/ui/src/patterns/AssistantChatForm.tsx

* Update packages/ui/src/patterns/AssistantChatForm.tsx

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2023-11-30 14:22:39 -03:30
Jonathan Summers-MuirandTerry Sutton d1c65ed77d chore: add non authenticated flow (#19243)
* add a new component for input

* add textArea

* some colors

* rename

* Update page.tsx

* move files

* Update ChatInput.tsx

* Update Header.tsx

* chore:upgrade next14

* Update package-lock.json

* update graphql

* add graphql dep

* Update package.json

* Update package-lock.json

* added server action in

* more actions

* getting actions in everywhere

* Update ConfirmDeleteThreadModal.tsx

* Update Input.tsx

* update modal action

* Bump nextjs in database-new to v14.

* fix build

* trying server hooks

* more experiemntal stuff

* update delete

* shimmering

* update thread UI

* Update actions.ts

* Update actions.ts

* Update Thread.tsx

* Update Input.tsx

* updated

* delete thread updated

* chore: add non authenticated flow

* fix build

* Update page.tsx

* fix builds

* Update package-lock.json

* Update package.json

* Update package-lock.json

* Add login message

* Cleanup

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2023-11-28 15:35:06 -03:30
Jonathan Summers-MuirandTerry Sutton fe053fffb1 Chore/server state hooks (#19203)
* add a new component for input

* add textArea

* some colors

* rename

* Update page.tsx

* move files

* Update ChatInput.tsx

* Update Header.tsx

* chore:upgrade next14

* Update package-lock.json

* update graphql

* add graphql dep

* Update package.json

* Update package-lock.json

* added server action in

* more actions

* getting actions in everywhere

* Update ConfirmDeleteThreadModal.tsx

* Update Input.tsx

* update modal action

* Bump nextjs in database-new to v14.

* fix build

* trying server hooks

* more experiemntal stuff

* update delete

* shimmering

* update thread UI

* Update actions.ts

* Update actions.ts

* Update Thread.tsx

* Update Input.tsx

* updated

* delete thread updated

* fix build

* Update package-lock.json

* Update edit thread modal

* fixing build

* reset

* Update package-lock.json

* Update SpreadsheetImport.utils.ts

* reset

* Update package-lock.json

* Update sitemap_www.xml

* pacakge update

* change to node 18

* Fix deleting threads

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2023-11-28 12:35:44 -03:30
dependabot[bot] 5d3faf8fcf chore(deps): bump postcss from 8.4.29 to 8.4.31 (#19245)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.29 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.29...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 12:32:13 +05:30
Terry SuttonandJonathan Summers-Muir 385d9a9e61 Faqs updates (#19208)
* Faqs updates

* Add file

* Apply suggestions from code review

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2023-11-25 06:27:50 +00:00
efab162ff9 Chore/server actions (#19200)
* Migrate database-new to use server actions.

* Revert the package-lock.json changes, leftover from a rebased commit.

* Add server actions config back

* Cleanup

* Cleanup

* Undo

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
2023-11-24 13:15:43 -03:30
Jonathan Summers-Muir 7ce355222b Chore/next14 database design (#19190)
Bump nextjs in database-new to v14.
2023-11-24 17:05:36 +01:00
Jonathan Summers-Muir afd18c0e81 Chore/db design input component (#19191)
* add a new component for input

* add textArea

* some colors

* rename

* Update page.tsx

* move files

* Update ChatInput.tsx

* Update Header.tsx
2023-11-24 16:15:28 +01:00
Terry SuttonandJoshen Lim 4c20bb0d52 Chore/db visualizer 3 (#19177)
* Midway doing something

* Small refactor

* Some mobile responsiveness

* bit fix

* Update name

* One more name

* One more name, again

* Footer and faqs

* Fix

* Style fixes

* Style fixes

* Add titles

* Add CTAs to copy, download or load SQL in supabase

* Styling

* mobile

* Add suggestions

* Add delete action

* Cleanup

* Add delete thread and edit thread modals

* Restore server action

* Fix build error

* Import common theme switcher

* Add file

* Restore thread list

* force revalidating profile path

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2023-11-24 13:48:14 +08:00
Terry SuttonandJonathan Summers-Muir 9af8f5cd54 Feat/db new login 2 (#19153)
* Add supabase backend

* add ssr

* Add thread name to supabase

* Update supabase.ts

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2023-11-23 14:13:02 +08:00
fbfe910c22 Initial work on database.new visualizer (#19027)
* Initial commit.

* Remove bunch of unneeded deps.

* Fix the providers.

* Minor fixes to make the themes work.

* Fix prettier errors.

* Add default constraint.

* Midway styling

* General styling improvements

* More styling stuff

* Bit more styling

* Bit more pizzazz

* Scaffold all threads modal

* Small style fix

* Ensure loading state persist in new page until redirect

* Fix

* Test';

* Add basic validation

* Fix

* Remove console logs

* Hide show all threads button

* chore: style the blocks

* fix: stroke width

* add some shadow

* stroke width

* Update TableNode.tsx

* Swap hide chat for hide code

* more sidebar styling

* Resolve conflicts

* Some style fixeds

* Some style fixeds

* mock profile

* update user dorpdown

* Update globals.css

* Chore/db new layouts and url params (#19142)

* chore: layouts

* Fix + clean up

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

* Fix header

* Scaffold profile and conversations

* Some quick styling

* Update apps/database-new/.env.local.example

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
2023-11-22 12:31:32 -03:30
Ivan Vasilov e129ac577b feat: Add database-new app (#18982)
* Initial commit for the database-new app.

* Change the port to 3002.

* Run prettier on database-new app.
2023-11-15 14:07:28 +00:00