The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(assistant): use uuidv4 for chat ID generation (#37462)
varshith257e77eb4f43ecf
diff --git a/apps/studio/state/ai-assistant-state.tsx b/apps/studio/state/ai-assistant-state.tsxindex 8d8cc7e2713..c6047f3e8be 100644--- a/apps/studio/state/ai-assistant-state.tsx+++ b/apps/studio/state/ai-assistant-state.tsx@@ -2,6 +2,7 @@ import type { Message as MessageType } from 'ai/react'import { DBSchema, IDBPDatabase, openDB } from 'idb'import { debounce } from 'lodash'import { createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'+import { v4 as uuidv4 } from 'uuid'import { proxy, snapshot, subscribe, useSnapshot } from 'valtio'import { LOCAL_STORAGE_KEYS } from 'common'@@ -234,7 +235,7 @@ export const createAiAssistantState = (): AiAssistantState => {Pick<AiAssistantData, 'open' | 'initialInput' | 'sqlSnippets' | 'suggestions' | 'tables'>>) => {- const chatId = crypto.randomUUID()+ const chatId = uuidv4()const newChat: ChatSession = {id: chatId,name: options?.name ?? 'Untitled',