+ Function deployed successfully! You can now invoke it at:
+
+
+
+ To download and work on this function locally, use the CLI command:
+
+
+ >
+ )}
+
+ )}
+
+ )
+}
diff --git a/apps/studio/pages/api/ai/sql/generate-v3.ts b/apps/studio/pages/api/ai/sql/generate-v3.ts
index 4843862c3c7..e0f229a1708 100644
--- a/apps/studio/pages/api/ai/sql/generate-v3.ts
+++ b/apps/studio/pages/api/ai/sql/generate-v3.ts
@@ -121,7 +121,12 @@ async function handlePost(req: NextApiRequest, res: NextApiResponse) {
- First, always use the getEdgeFunctionKnowledge tool to get knowledge about how to write edge functions for Supabase
- When writing edge functions, always ensure that they are written in TypeScript and Deno JavaScript runtime.
- When writing edge functions, always ensure that they are written in a way that is compatible with the database schema.
- - When suggesting edge functions, dont suggest generic edge functions as shown in the getEdgeFunctionKnowledge tool, create personalised edge functions based on the database schema.
+ - When suggesting edge functions, follow the guidelines in getEdgeFunctionKnowledge tool. Always create personalised edge functions based on the database schema
+ - When outputting edge functions, always include a props comment in the first line of the code block:
+ -- props: {"name": "function-name", "title": "Human readable title"}
+ - The function name in the props must be URL-friendly (use hyphens instead of spaces or underscores)
+ - Always wrap the edge function code in a markdown code block with the language set to 'edge'
+ - The props comment must be the first line inside the code block, followed by the actual function code
# You convert sql to supabase-js client code
Use the convertSqlToSupabaseJs tool to convert select sql to supabase-js client code. Only provide js code snippets if explicitly asked. If conversion isn't supported, build a postgres function instead and suggest using supabase-js to call it via "const { data, error } = await supabase.rpc('echo', { say: '👋'})"