diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureInfo.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureInfo.tsx index 8f76722423573..6cb810871b55e 100644 --- a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureInfo.tsx +++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureInfo.tsx @@ -193,6 +193,7 @@ const InfrastructureInfo = () => { )} + {/* TODO(bobbie): once extension_dependent_objects is removed on the backend, remove this block and the ts-ignores below */} {!data?.eligible && (data?.extension_dependent_objects || []).length > 0 && ( { ? 'These extensions are not supported in newer versions of Supabase Postgres. If you are not using them, it is safe to remove them.' : 'Check the docs for which ones might need to be removed.'}

-
+
+ +
+ )} + {!data?.eligible && + // @ts-ignore + (data?.unsupported_extensions || []).length > 0 && ( + + + A new version of Postgres is available + + +
+

+ You'll need to remove the following extensions before upgrading: +

+ +
    + { + // @ts-ignore + (data?.unsupported_extensions || []).map((obj: string) => ( +
  • + {obj} +
  • + )) + } +
+
+

+ These extensions are not supported in newer versions of Supabase + Postgres. If you are not using them, it is safe to remove them. +

+
+ +
+
+
+ )} )} diff --git a/packages/ai-commands/src/docs.ts b/packages/ai-commands/src/docs.ts index 5152655e018d3..07111da4cb0f5 100644 --- a/packages/ai-commands/src/docs.ts +++ b/packages/ai-commands/src/docs.ts @@ -63,7 +63,7 @@ export async function clippy( const [{ embedding }] = embeddingResponse.data - const { error: matchError, data: pageSections } = await supabaseClient + const { error: matchError, data: pageSections } = (await supabaseClient .rpc('match_page_sections_v2', { embedding, match_threshold: 0.78, @@ -71,7 +71,7 @@ export async function clippy( }) .neq('rag_ignore', true) .select('content,page!inner(path),rag_ignore') - .limit(10) as { error: any; data: PageSection[] | null } + .limit(10)) as { error: any; data: PageSection[] | null } if (matchError || !pageSections) { throw new ApplicationError('Failed to match page sections', matchError) @@ -93,10 +93,10 @@ export async function clippy( } const pagePath = pageSection.page.path - + // Include source reference with each section contextText += `[Source ${sourceIndex}: ${pagePath}]\n${content.trim()}\n---\n` - + // Track sources for later reference if (!sourcesMap.has(pagePath)) { sourcesMap.set(pagePath, content) diff --git a/packages/ui-patterns/src/CommandMenu/prepackaged/ai/utils.ts b/packages/ui-patterns/src/CommandMenu/prepackaged/ai/utils.ts index dc88db896bea6..96f64044e599f 100644 --- a/packages/ui-patterns/src/CommandMenu/prepackaged/ai/utils.ts +++ b/packages/ui-patterns/src/CommandMenu/prepackaged/ai/utils.ts @@ -49,7 +49,12 @@ interface FinalizeWithSourcesAction { index: number } -type MessageAction = NewMessageAction | UpdateMessageAction | AppendContentAction | ResetAction | FinalizeWithSourcesAction +type MessageAction = + | NewMessageAction + | UpdateMessageAction + | AppendContentAction + | ResetAction + | FinalizeWithSourcesAction export { MessageRole, MessageStatus } export type { Message, MessageAction, SourceLink }