Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/docs/public/humans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Aaron Brooks
Aaron Byrne
Adam Mohammed
Adam Mokan
Adam Whitlock
AJ Matias
Akash Manimaran
Akilesh Sethu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ActiveCompute = ({ orgDailyStats, isLoadingOrgDailyStats }: ComputeProps)
? [
{
name: 'Learn more',
url: `${DOCS_URL}/guides/integrations/supabase-for-platforms#pico-compute-instance`,
url: `${DOCS_URL}/guides/integrations/supabase-for-platforms#nano-compute-instance`,
},
]
: [],
Expand Down
1 change: 1 addition & 0 deletions apps/studio/evals/assistant.eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Eval('Assistant', {
try {
const result = await generateAssistantResponse({
...modelResponse.modelParams,
isExplorerEnabled: true,
messages: [
{
id: '1',
Expand Down
42 changes: 42 additions & 0 deletions apps/studio/evals/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,46 @@ export const dataset: AssistantEvalCase[] = [
description: 'Warns about irreversible data loss before executing DELETE without WHERE',
},
},
// Notebook cases
{
input: { prompt: 'What notebooks do I have saved?' },
expected: {
requiredTools: ['list_notebooks'],
correctAnswer: 'Mentions both "Auth health check" and "Edge function error triage".',
},
metadata: {
category: ['general_help'],
description: 'Basic notebook enumeration',
},
},
{
input: { prompt: 'Show me my most recently created notebook' },
expected: {
requiredTools: [
{
name: 'list_notebooks',
input: {
sort_by: { equals: 'inserted_at' },
},
},
],
},
metadata: {
category: ['general_help'],
description:
'Sorts by creation time since there is no "updated_at" sort key available from the API',
},
},
{
input: { prompt: "Do I have a notebook called 'Storage cleanup'?" },
expected: {
requiredTools: ['list_notebooks'],
correctAnswer: 'States that no notebook called "Storage cleanup" exists.',
},
metadata: {
category: ['general_help'],
description:
'Guards against inventing a notebook instead of calling the tool and reporting the real, negative result',
},
},
]
27 changes: 27 additions & 0 deletions apps/studio/lib/ai/tools/notebook-tools.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,33 @@ describe('ai/tools/notebook-tools', () => {
cursor: 'next-page',
})
})

it('should forward sort_by as the content API sort_by query param', async () => {
let capturedRequest: Request | undefined

addAPIMock({
method: 'get',
path: '/platform/projects/:ref/content',
response: ({ request }) => {
capturedRequest = request
return HttpResponse.json<GetUserContentResponse>({
cursor: undefined,
data: [],
} as unknown as GetUserContentResponse)
},
})

const tools = getNotebookTools({ projectRef: 'test-project' })
if (!tools.list_notebooks.execute) throw new Error('execute is undefined')

await tools.list_notebooks.execute(
{ limit: 1, sort_by: 'inserted_at' },
{ toolCallId: 'test', messages: [] }
)

const url = new URL(capturedRequest!.url)
expect(url.searchParams.get('sort_by')).toBe('inserted_at')
})
})

describe('get_notebook', () => {
Expand Down
10 changes: 8 additions & 2 deletions apps/studio/lib/ai/tools/notebook-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,16 @@ export const getNotebookTools = (ctx: NotebookToolsContext = {}) => {
.max(100)
.default(20)
.describe('Max number of notebooks to return.'),
sort_by: z
.enum(['name', 'inserted_at'])
.optional()
.describe(
'Field to sort notebooks by. There is no "updated_at" sort — use "inserted_at" for creation order.'
),
}),
execute: async ({ cursor, limit }) => {
execute: async ({ cursor, limit, sort_by }) => {
const { content, cursor: nextCursor } = await getContent(
{ projectRef, type: 'notebook', limit, cursor },
{ projectRef, type: 'notebook', limit, cursor, sort: sort_by },
undefined,
authHeaders
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You control the entire experience. Your users get the full power of Supabase.
With **Supabase for Platforms**, you can:

- Offer a complete white-label backend to your users entirely powered by Supabase
- Pay only for compute hours consumed with our newest Pico instances that scale to zero
- Pay only for compute hours consumed with Nano instances that scale to zero
- Access features purpose-built for managing backends on behalf of your users
- Embed a lightweight Supabase Dashboard directly in your app through Platform Kit, so your users never leave your tooling
- Let your users "claim" (transfer) their projects to their own Supabase orgs whenever they're ready, while you maintain access to those projects through OAuth integration
Expand Down Expand Up @@ -138,9 +138,9 @@ These features are available to a subset of our AI Builder customers. [Contact u

## Compute that scales to zero

We offer Pico instances that scale to zero when not in use. This is ideal for platforms with many projects that have variable usage. You only pay for what your users actually use.
We offer Nano instances that scale to zero when not in use. This is ideal for platforms with many projects that have variable usage. You only pay for what your users actually use.

[Docs](/docs/guides/integrations/supabase-for-platforms#pico-compute-instance)
[Docs](/docs/guides/integrations/supabase-for-platforms#nano-compute-instance)

## Restore points

Expand Down
4 changes: 2 additions & 2 deletions apps/www/components/Solutions/FeaturesGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import styles from './features-grid.module.css'

export default function FeaturesGrid(props: any) {
const hasExtendedCards = props.features.some(
(f: any) => f.id === 'claim-flow' || f.id === 'platform-kit' || f.id === 'pico-instances'
(f: any) => f.id === 'claim-flow' || f.id === 'platform-kit' || f.id === 'nano-instances'
)

return (
Expand Down Expand Up @@ -43,7 +43,7 @@ export default function FeaturesGrid(props: any) {
<Content card={props.features.find((f: any) => f.id === 'claim-flow')} />
<Content card={props.features.find((f: any) => f.id === 'platform-kit')} />
<Content
card={props.features.find((f: any) => f.id === 'pico-instances')}
card={props.features.find((f: any) => f.id === 'nano-instances')}
innerClassName="
xl:flex-row
[&_.image-container]:border-b
Expand Down
4 changes: 2 additions & 2 deletions apps/www/components/Solutions/features-grid.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
'postgres mgmt-api'
'pricing branching'
'claim-flow platform-kit'
'pico-instances pico-instances';
'nano-instances nano-instances';
}

@media (min-width: 1280px) {
.features-grid-extended {
grid-template-areas:
'postgres mgmt-api mgmt-api'
'pricing branching claim-flow'
'platform-kit pico-instances pico-instances';
'platform-kit nano-instances nano-instances';
}
}
4 changes: 2 additions & 2 deletions apps/www/data/solutions/ai-builders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ const data: {
),
},
{
id: 'pico-instances',
id: 'nano-instances',
icon: Timer,
heading: (
<>
Expand Down Expand Up @@ -657,7 +657,7 @@ const data: {
strokeLinejoin="round"
/>
</svg>
Pico instances
Nano instances
</>
),
subheading: (
Expand Down
Loading