Skip to content

Commit cfed52a

Browse files
fsansalvadoreSaxonFkiwicoppleMildTomato
authored
Tiger d1 (supabase#30770)
* tiger d1 layout setup * prep d1 * twitter links * banner * ticket * see through nav * gold * update d1 visual * restore ticket sharing ui * add assistant blog post * add video placeholder * update copy * add image * add sql to supabase js * Update apps/www/_blog/2024-12-02-supabase-assistant.mdx Co-authored-by: Copple <[email protected]> * Update apps/www/_blog/2024-12-02-supabase-assistant.mdx Co-authored-by: Copple <[email protected]> * Update apps/www/_blog/2024-12-02-supabase-assistant.mdx Co-authored-by: Copple <[email protected]> * update images * copple edits * gradient updates * changed to svg * add thumbs * remove character * switched url * Update lw13_data.tsx * small changes * Update sitemap_www.xml * Update 2024-12-02-supabase-ai-assistant-v2.mdx --------- Co-authored-by: Saxon Fletcher <[email protected]> Co-authored-by: Copple <[email protected]> Co-authored-by: Jonathan Summers-Muir <[email protected]>
1 parent 634b62e commit cfed52a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2887
-825
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title: 'Supabase AI Assistant v2'
3+
description: An evolution of how we approach AI within the Supabase dashboard
4+
author: saxon_fletcher,joshenlim
5+
image: launch-week-13/day-1-ai-assistant-v2/og.jpg
6+
thumb: launch-week-13/day-1-ai-assistant-v2/thumb.jpg
7+
categories:
8+
- developers
9+
- postgres
10+
tags:
11+
- AI
12+
- postgres
13+
date: '2024-12-02'
14+
toc_depth: 3
15+
---
16+
17+
Today we releasing Supabase Assistant v2 in the dashboard - a global assistant with several new abilities:
18+
19+
1. Postgres schema design
20+
1. Data queries and charting
21+
1. Error debugging
22+
1. Postgres RLS Policies: create and edit
23+
1. Postgres Functions: create and edit
24+
1. Postgres Triggers: create and edit
25+
1. SQL to `supabase-js` conversion
26+
27+
## A new, unified approach to AI
28+
29+
Our new Assistant more extensible, using a flexible system of components, tools, and APIs. You can provide context manually (e.g. an RLS Policy) or automatically based on whichever page you're visiting in the dashboard (e.g. the specific table you're working on).
30+
31+
The result is a single panel that's persistent across the entire dashboard. It sits alongside your workspace and can be called upon when needed (`cmd+i`!). It automatically retrieves context for your prompt and can be provided with extra context similar to other AI tools like Cursor and GitHub Copilot.
32+
33+
## New abilities in Supabase Assistant v2
34+
35+
Let's take a look at new abilities in this release.
36+
37+
### Schema design
38+
39+
If you are creating something new, the Assistant can guide or inspire you. It will show you how to structure your database and generate all the SQL queries to set it up.
40+
41+
<Img
42+
alt="Design new database schemas"
43+
src="/images/blog/launch-week-13/day-1-ai-assistant-v2/design.png"
44+
/>
45+
46+
### Writing SQL
47+
48+
Like our previous Assistant, the new Assistant will help you write queries based on your schema. This version has better contextual understanding and can provide more accurate suggestions.
49+
50+
### Debug your queries
51+
52+
Writing SQL can be tough. You can use the new Assistant to debug database errors directly through the SQL Editor or within the Assistant panel.
53+
54+
<Img
55+
alt="Debug your queries with AI"
56+
src="/images/blog/launch-week-13/day-1-ai-assistant-v2/debug.png"
57+
/>
58+
59+
### Discover data insights
60+
61+
The new Assistant can run queries directly. This can be a useful (and fun) way to query your data through natural language. Basic select queries run automatically, and results are displayed within the conversation in tabular form or chart form. The chart axis are picked intuitively by the Assistant. No data is sent to the underlying LLM, only your schema structure. This is a helpful tool for folks who are not comfortable with SQL but are still interested in analyzing data insights.
62+
63+
<Img alt="Query data with AI" src="/images/blog/launch-week-13/day-1-ai-assistant-v2/query.png" />
64+
65+
### SQL to REST
66+
67+
Once your database is set up, probably want to connect to it directly or with one of our client libraries. If you're using our `supabase-js` library, we've added a helpful tool to convert an SQL query to supabase-js client code. Simply ask the Assistant to convert a query, and it will respond with either a complete snippet for you to copy or a combination of function + RPC call. This is powered by the [sql-to-rest](/docs/guides/api/sql-to-rest) tool.
68+
69+
<Img
70+
alt="Convert SQL to supabase-js code"
71+
src="/images/blog/launch-week-13/day-1-ai-assistant-v2/js.png"
72+
/>
73+
74+
### RLS Policies: Protect your database
75+
76+
Use the Assistant to suggest, create or modify RLS Policies. Simply explain the desired behavior and the Assistant will generate a new Policy using the context of your database schema and existing policies. To edit an existing policy, click “edit with Assistant” within your Policy list. The Assistant will be provided the appropriate context for you to start prompting.
77+
78+
<Img
79+
alt="Create and edit RLS Policies with AI"
80+
src="/images/blog/launch-week-13/day-1-ai-assistant-v2/policy.png"
81+
/>
82+
83+
### Postgres Functions and Triggers
84+
85+
Suggest, create or update functions and triggers in a similar way to policies. Just describe what you want or select “Edit with Assistant” from your Function or Trigger list.
86+
87+
<Img
88+
alt="Create and edit functions and triggers with AI"
89+
src="/images/blog/launch-week-13/day-1-ai-assistant-v2/functions.png"
90+
/>
91+
92+
## Feedback
93+
94+
This release gives us a foundation to build off and incorporate into other parts of your database journey. Where are you struggling the most when using Postgres? How might the Assistant help you? Send us your thoughts, ideas, concerns via the feedback form within the dashboard.
95+
96+
## How to access
97+
98+
Supabase Assistant v2 is available today.
99+
Go to a Project and hit `cmd + i`, or alternatively click the Assistant icon in the top right toolbar.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: 'Supabase AI Assistant v2'
3+
description: An evolution of how we approach AI within the Supabase dashboard
4+
author: saxon_fletcher
5+
image: launch-week-13/day-1-ai-assistant/og.jpg
6+
thumb: launch-week-13/day-1-ai-assistant/thumb.jpg
7+
categories:
8+
- developers
9+
- postgres
10+
tags:
11+
- AI
12+
- postgres
13+
date: '2024-12-02'
14+
toc_depth: 3
15+
---
16+
17+
Today we releasing Supabase Assistant v2 in the dashboard - a global assistant with several new abilities:
18+
19+
1. Postgres schema design
20+
1. Data queries and charting
21+
1. Error debugging
22+
1. Postgres RLS Policies: create and edit
23+
1. Postgres Functions: create and edit
24+
1. Postgres Triggers: create and edit
25+
1. SQL to `supabase-js` conversion
26+
27+
## A new, unified approach to AI
28+
29+
Our new Assistant more extensible, using a flexible system of components, tools, and APIs. You can provide context manually (e.g. an RLS Policy) or automatically based on whichever page you're visiting in the dashboard (e.g. the specific table you're working on).
30+
31+
The result is a single panel that's persistent across the entire dashboard. It sits alongside your workspace and can be called upon when needed (`cmd+i`!). It automatically retrieves context for your prompt and can be provded with extra context similar to other AI tools like Cursor and GitHub Copilot.
32+
33+
## New abilities in Supabase Assistant v2
34+
35+
Let's take a look at new abilities in this release.
36+
37+
### Schema design
38+
39+
If you are creating something new, the Assistant can guide or inspire you. It will show you how to structure your database and generate all the SQL queries to set it up.
40+
41+
<Img alt="Design new database schemas" src="/images/blog/launch-week-13/assistant/design.png" />
42+
43+
### Writing SQL
44+
45+
Like our previous Assistant, the new Assistant will help you write queries based on your schema. This version has better contextual understanding and can provide more accurate suggestions.
46+
47+
### Debug your queries
48+
49+
Writing SQL can be tough. You can use the new Assistant to debug database errors directly through the SQL Editor or within the Assistant panel.
50+
51+
<Img alt="Debug your queries with AI" src="/images/blog/launch-week-13/assistant/debug.png" />
52+
53+
### Discover data insights
54+
55+
The new Assistant can run queries directly. This can be a useful (and fun) way to query your data through natural language. Basic select queries run automatically, and results are displayed within the conversation in tabular form or chart form. The chart axis are picked intuitively by the Assistant. No data is sent to the underlying LLM, only your schema structure. This is a helpful tool for folks who are not comfortable with SQL but are still interested in analyzing data insights.
56+
57+
<Img alt="Query data with AI" src="/images/blog/launch-week-13/assistant/query.png" />
58+
59+
### SQL to REST
60+
61+
Once your database is set up, probably want to connect to it directly or with one of our client libraries. If you're using our `supabase-js` library, we've added a helpful tool to convert an SQL query to supabase-js client code. Simply ask the Assistant to convert a query, and it will respond with either a complete snippet for you to copy or a combination of function + RPC call. This is powered by the [sql-to-rest](/docs/guides/api/sql-to-rest) tool.
62+
63+
<Img alt="Convert SQL to supabase-js code" src="/images/blog/launch-week-13/assistant/js.png" />
64+
65+
### RLS Policies: Protect your database
66+
67+
Use the Assistant to suggest, create or modify RLS Policies. Simply explain the desired behavior and the Assistant will generate a new Policy using the context of your database schema and existing policies. To edit an existing policy, click “edit with Assistant” within your Policy list. The Assistant will be provided the appropriate context for you to start prompting.
68+
69+
<Img
70+
alt="Create and edit RLS Policies with AI"
71+
src="/images/blog/launch-week-13/assistant/policy.png"
72+
/>
73+
74+
### Postgres Functions and Triggers
75+
76+
Suggest, create or update functions and triggers in a similar way to policies. Just describe what you want or select “Edit with Assistant” from your Function or Trigger list.
77+
78+
<Img
79+
alt="Create and edit functions and triggers with AI"
80+
src="/images/blog/launch-week-13/assistant/functions.png"
81+
/>
82+
83+
## Feedback
84+
85+
This release gives us a foundation to build off and incorporate into other parts of your database journey. Where are you struggling the most when using Postgres? How might the Assistant help you? Send us your thoughts, ideas, concerns via the feedback form within the dashboard.
86+
87+
## How to access
88+
89+
Supabase Assistant v2 is a feature preview which you can access via your Profile menu → Feature previews → Supabase AI Assistant V2 → Enable. Once you enable it you'll see the assistant icon in your toolbar, or alternatively hit `cmd + i` anywhere in the dashboard.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"show": true,
3-
"text": "Supabase Launch Week 8",
3+
"text": "Supabase Launch Week 13: Day 1",
44
"launchDate": "2023-08-07T09:00:00.000-07:00",
5-
"link": "https://supabase.com/launch-week",
5+
"link": "https://supabase.com/launch-week#day-1",
66
"badge": "Get your ticket"
77
}

apps/www/components/Hero/Hero.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const Hero = () => {
2525
<div className="flex flex-col items-center">
2626
<div className="z-40 w-full flex justify-center -mt-4 lg:-mt-12 mb-8">
2727
<AnnouncementBadge
28-
url="/launch-week"
28+
url="/launch-week#day-1"
2929
badge="Launch Week 13"
30-
announcement="Claim ticket"
30+
announcement="Day 1: AI Assistant v2"
3131
/>
3232
</div>
3333
<h1 className="text-foreground text-4xl sm:text-5xl sm:leading-none lg:text-7xl">

apps/www/components/LaunchWeek/12/Countdown.tsx

Lines changed: 0 additions & 41 deletions
This file was deleted.

apps/www/components/LaunchWeek/12/HackathonCallout.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import React from 'react'
22
import { TextLink, cn } from 'ui'
3-
import CountdownComponent from './Countdown'
4-
import { LW11_LAUNCH_DATE_END } from '~/lib/constants'
53

64
const HackathonCallout = ({ className }: { className?: string }) => {
7-
const isActive = new Date() < new Date(LW11_LAUNCH_DATE_END)
8-
95
return (
106
<div
117
className={cn(
@@ -14,13 +10,7 @@ const HackathonCallout = ({ className }: { className?: string }) => {
1410
)}
1511
>
1612
<div className="!text-foreground [&_*]:text-foreground text-sm flex flex-col sm:flex-row sm:items-center sm:gap-3">
17-
{isActive ? (
18-
<>
19-
Hackathon ends in <CountdownComponent date={LW11_LAUNCH_DATE_END} showCard={false} />
20-
</>
21-
) : (
22-
'Open Source Hackathon 2024'
23-
)}
13+
Open Source Hackathon 2024
2414
</div>
2515
<div className="!m-0 flex items-center">
2616
<TextLink

apps/www/components/LaunchWeek/12/LWMeetups.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const LWMeetups = ({ meetups, className }: { meetups?: Meetup[]; className?: str
8787
</div>
8888
<div className="col-span-1 xl:col-span-7 xl:col-start-6 w-full max-w-4xl flex flex-wrap gap-x-2 md:gap-x-3 gap-y-1">
8989
{meets &&
90-
meets.map((meetup: Meetup, i: number) => {
90+
meets?.map((meetup: Meetup, i: number) => {
9191
const startAt = new Date(meetup.start_at)
9292
const endAt = addHours(new Date(meetup.start_at), 3)
9393
const after = now > startAt

apps/www/components/LaunchWeek/12/LaunchWeekLogoHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export function LaunchWeekLogoHeader() {
22
return (
33
<div className="flex flex-col gap-1 md:gap-2 items-center justify-end">
44
<div className="opacity-0 !animate-[fadeIn_0.5s_cubic-bezier(0.25,0.25,0,1)_0.5s_both] px-2 flex flex-col items-center text-center gap-3">
5-
<h1 className="sr-only font-normal uppercase text-[28px] sm:text-[32px]">Launch week 8</h1>
5+
<h1 className="sr-only font-normal uppercase text-[28px] sm:text-[32px]">Launch week 12</h1>
66
<p className="text-white radial-gradient-text-600 text-lg sm:text-2xl">
77
<span className="block">August 7th–11th, 2023</span>
88
</p>

apps/www/components/LaunchWeek/12/Releases/components/DaySection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Edit } from 'lucide-react'
77
import { useBreakpoint } from 'common'
88

99
import { WeekDayProps } from '../data'
10-
import CountdownComponent from '../../Countdown'
10+
// import CountdownComponent from '../../Countdown'
1111
import { DayLink } from '.'
1212

1313
const DaySection = ({ day, className }: { day: WeekDayProps; className?: string }) => {
@@ -146,7 +146,7 @@ const DaySection = ({ day, className }: { day: WeekDayProps; className?: string
146146
/>
147147
</g>
148148
</svg>
149-
{day.hasCountdown && <CountdownComponent date={day.published_at} showCard={false} />}
149+
{/* {day.hasCountdown && <CountdownComponent date={day.published_at} showCard={false} />} */}
150150
</div>
151151
<div>
152152
<Skeleton className="w-full h-3 max-w-xs rounded-full will-change-contents" />

apps/www/components/LaunchWeek/13/Multiplayer/CanvasSingleMode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export default function InteractiveGridSingle() {
197197
height={CANVAS_HEIGHT}
198198
onMouseMove={handleMouseMove}
199199
onMouseLeave={handleMouseLeave}
200-
className="border border-gray-300 shadow-lg"
200+
className="border border-gray-300 shadow-lg pointer-events-auto"
201201
/>
202202

203203
{/* Current user cursor */}

0 commit comments

Comments
 (0)