diff --git a/apps/postgres-new/.gitignore b/apps/postgres-new/.gitignore
new file mode 100644
index 00000000..33a7894a
--- /dev/null
+++ b/apps/postgres-new/.gitignore
@@ -0,0 +1 @@
+public/sw.mjs
\ No newline at end of file
diff --git a/apps/postgres-new/app/api/chat/route.ts b/apps/postgres-new/app/api/chat/route.ts
index 4a7a0b62..1488ef0f 100644
--- a/apps/postgres-new/app/api/chat/route.ts
+++ b/apps/postgres-new/app/api/chat/route.ts
@@ -2,8 +2,8 @@ import { createOpenAI } from '@ai-sdk/openai'
import { Ratelimit } from '@upstash/ratelimit'
import { kv } from '@vercel/kv'
import { convertToCoreMessages, streamText, ToolInvocation, ToolResultPart } from 'ai'
-import { codeBlock } from 'common-tags'
-import { convertToCoreTools, maxMessageContext, maxRowLimit, tools } from '~/lib/tools'
+import { getSystemPrompt } from '~/lib/system-prompt'
+import { convertToCoreTools, maxMessageContext, tools } from '~/lib/tools'
import { createClient } from '~/utils/supabase/server'
import { ChatInferenceEventToolResult, logEvent } from '~/utils/telemetry'
@@ -72,49 +72,8 @@ export async function POST(req: Request) {
const coreMessages = convertToCoreMessages(trimmedMessageContext)
const coreTools = convertToCoreTools(tools)
- const result = await streamText({
- system: codeBlock`
- You are a helpful database assistant. Under the hood you have access to an in-browser Postgres database called PGlite (https://github.com/electric-sql/pglite).
- Some special notes about this database:
- - foreign data wrappers are not supported
- - the following extensions are available:
- - plpgsql [pre-enabled]
- - vector (https://github.com/pgvector/pgvector) [pre-enabled]
- - use <=> for cosine distance (default to this)
- - use <#> for negative inner product
- - use <-> for L2 distance
- - use <+> for L1 distance
- - note queried vectors will be truncated/redacted due to their size - export as CSV if the full vector is required
-
- When generating tables, do the following:
- - For primary keys, always use "id bigint primary key generated always as identity" (not serial)
- - Prefer 'text' over 'varchar'
- - Keep explanations brief but helpful
- - Don't repeat yourself after creating the table
-
- When creating sample data:
- - Make the data realistic, including joined data
- - Check for existing records/conflicts in the table
-
- When querying data, limit to 5 by default. The maximum number of rows you're allowed to fetch is ${maxRowLimit} (to protect AI from token abuse).
- If the user needs to fetch more than ${maxRowLimit} rows at once, they can export the query as a CSV.
-
- When performing FTS, always use 'simple' (languages aren't available).
-
- When importing CSVs try to solve the problem yourself (eg. use a generic text column, then refine)
- vs. asking the user to change the CSV. No need to select rows after importing.
-
- You also know math. All math equations and expressions must be written in KaTex and must be wrapped in double dollar \`$$\`:
- - Inline: $$\\sqrt{26}$$
- - Multiline:
- $$
- \\sqrt{26}
- $$
-
- No images are allowed. Do not try to generate or link images, including base64 data URLs.
-
- Feel free to suggest corrections for suspected typos.
- `,
+ const result = streamText({
+ system: getSystemPrompt(),
model: openai(chatModel),
messages: coreMessages,
tools: coreTools,
@@ -158,7 +117,7 @@ export async function POST(req: Request) {
},
})
- return result.toAIStreamResponse()
+ return result.toDataStreamResponse()
}
function getEventToolResult(toolResult: ToolResultPart): ChatInferenceEventToolResult | undefined {
diff --git a/apps/postgres-new/components/app-provider.tsx b/apps/postgres-new/components/app-provider.tsx
index b4905ced..557a3508 100644
--- a/apps/postgres-new/components/app-provider.tsx
+++ b/apps/postgres-new/components/app-provider.tsx
@@ -32,6 +32,7 @@ import {
import { legacyDomainHostname } from '~/lib/util'
import { parse, serialize } from '~/lib/websocket-protocol'
import { createClient } from '~/utils/supabase/client'
+import { useModelProvider } from './model-provider/use-model-provider'
export type AppProps = PropsWithChildren
@@ -252,6 +253,9 @@ export default function AppProvider({ children }: AppProps) {
const [isLegacyDomain, setIsLegacyDomain] = useState(false)
const [isLegacyDomainRedirect, setIsLegacyDomainRedirect] = useState(false)
+ const [modelProviderError, setModelProviderError] = useState()
+ const [isModelProviderDialogOpen, setIsModelProviderDialogOpen] = useState(false)
+
useEffect(() => {
const isLegacyDomain = window.location.hostname === legacyDomainHostname
const urlParams = new URLSearchParams(window.location.search)
@@ -263,12 +267,17 @@ export default function AppProvider({ children }: AppProps) {
setIsRenameDialogOpen(isLegacyDomain || isLegacyDomainRedirect)
}, [])
+ const modelProvider = useModelProvider()
+
return (
void
isRateLimited: boolean
setIsRateLimited: (limited: boolean) => void
+ isModelProviderDialogOpen: boolean
+ setIsModelProviderDialogOpen: (open: boolean) => void
focusRef: RefObject
dbManager?: DbManager
pgliteVersion?: string
@@ -316,6 +329,9 @@ export type AppContextValues = {
clientIp: string | null
isLiveSharing: boolean
}
+ modelProvider: ReturnType
+ modelProviderError?: string
+ setModelProviderError: (error: string | undefined) => void
isLegacyDomain: boolean
isLegacyDomainRedirect: boolean
}
diff --git a/apps/postgres-new/components/byo-llm-button.tsx b/apps/postgres-new/components/byo-llm-button.tsx
new file mode 100644
index 00000000..d09e2072
--- /dev/null
+++ b/apps/postgres-new/components/byo-llm-button.tsx
@@ -0,0 +1,24 @@
+import { Brain } from 'lucide-react'
+import { useApp } from '~/components/app-provider'
+import { Button } from '~/components/ui/button'
+
+export type ByoLlmButtonProps = {
+ onClick?: () => void
+}
+
+export default function ByoLlmButton({ onClick }: ByoLlmButtonProps) {
+ const { setIsModelProviderDialogOpen } = useApp()
+
+ return (
+
+ )
+}
diff --git a/apps/postgres-new/components/chat.tsx b/apps/postgres-new/components/chat.tsx
index 19cb8750..05a39690 100644
--- a/apps/postgres-new/components/chat.tsx
+++ b/apps/postgres-new/components/chat.tsx
@@ -3,7 +3,7 @@
import { Message, generateId } from 'ai'
import { useChat } from 'ai/react'
import { AnimatePresence, m } from 'framer-motion'
-import { ArrowDown, ArrowUp, Flame, Paperclip, PlugIcon, Square } from 'lucide-react'
+import { AlertCircle, ArrowDown, ArrowUp, Flame, Paperclip, PlugIcon, Square } from 'lucide-react'
import {
FormEventHandler,
useCallback,
@@ -22,6 +22,7 @@ import { requestFileUpload } from '~/lib/util'
import { cn } from '~/lib/utils'
import { AiIconAnimation } from './ai-icon-animation'
import { useApp } from './app-provider'
+import ByoLlmButton from './byo-llm-button'
import ChatMessage from './chat-message'
import { CopyableField } from './copyable-field'
import SignInButton from './sign-in-button'
@@ -51,8 +52,17 @@ export function getInitialMessages(tables: TablesData): Message[] {
}
export default function Chat() {
- const { user, isLoadingUser, focusRef, setIsSignInDialogOpen, isRateLimited, liveShare } =
- useApp()
+ const {
+ user,
+ isLoadingUser,
+ focusRef,
+ setIsSignInDialogOpen,
+ isRateLimited,
+ liveShare,
+ modelProvider,
+ modelProviderError,
+ setIsModelProviderDialogOpen,
+ } = useApp()
const [inputFocusState, setInputFocusState] = useState(false)
const {
@@ -155,7 +165,7 @@ export default function Chat() {
cursor: dropZoneCursor,
} = useDropZone({
async onDrop(files) {
- if (!user) {
+ if (isAuthRequired) {
return
}
@@ -223,8 +233,10 @@ export default function Chat() {
const [isMessageAnimationComplete, setIsMessageAnimationComplete] = useState(false)
+ const isAuthRequired = user === undefined && modelProvider.state?.enabled !== true
+
const isChatEnabled =
- !isLoadingMessages && !isLoadingSchema && user !== undefined && !liveShare.isLiveSharing
+ !isLoadingMessages && !isLoadingSchema && !isAuthRequired && !liveShare.isLiveSharing
const isSubmitEnabled = isChatEnabled && Boolean(input.trim())
@@ -293,6 +305,42 @@ export default function Chat() {
isLast={i === messages.length - 1}
/>
))}
+
+ {modelProviderError && !isLoading && (
+
+
+
+
+ )}
+
{isRateLimited && !isLoading && (
) : (
- {user ? (
+ {!isAuthRequired ? (
<>
-
- To prevent abuse we ask you to sign in before chatting with AI.
-
+ or
+
{
setIsSignInDialogOpen(true)
}}
@@ -427,7 +474,7 @@ export default function Chat() {
- {!user && !isLoadingUser && isConversationStarted && (
+ {isAuthRequired && !isLoadingUser && isConversationStarted && (
-
- To prevent abuse we ask you to sign in before chatting with AI.
-
+ or
+
{
@@ -487,7 +533,7 @@ export default function Chat() {
onClick={async (e) => {
e.preventDefault()
- if (!user) {
+ if (isAuthRequired) {
return
}
diff --git a/apps/postgres-new/components/layout.tsx b/apps/postgres-new/components/layout.tsx
index 11000a04..06283d37 100644
--- a/apps/postgres-new/components/layout.tsx
+++ b/apps/postgres-new/components/layout.tsx
@@ -3,14 +3,12 @@
import 'chart.js/auto'
import 'chartjs-adapter-date-fns'
-import { DialogTrigger } from '@radix-ui/react-dialog'
import { LazyMotion, m } from 'framer-motion'
-import { Loader, MoreVertical } from 'lucide-react'
+import { Loader } from 'lucide-react'
import Link from 'next/link'
-import { PropsWithChildren, useState } from 'react'
+import { PropsWithChildren } from 'react'
import { TooltipProvider } from '~/components/ui/tooltip'
import { useDatabasesQuery } from '~/data/databases/databases-query'
-import { useBreakpoint } from '~/lib/use-breakpoint'
import {
currentDomainHostname,
currentDomainUrl,
@@ -18,7 +16,6 @@ import {
legacyDomainUrl,
} from '~/lib/util'
import { useApp } from './app-provider'
-import { LiveShareIcon } from './live-share-icon'
import Sidebar from './sidebar'
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './ui/accordion'
import { Dialog, DialogContent, DialogHeader, DialogTitle } from './ui/dialog'
@@ -29,14 +26,12 @@ export type LayoutProps = PropsWithChildren
export default function Layout({ children }: LayoutProps) {
const { isLegacyDomain, isLegacyDomainRedirect } = useApp()
- const isSmallBreakpoint = useBreakpoint('lg')
return (
- {!isLegacyDomain && }
{(isLegacyDomain || isLegacyDomainRedirect) && }
@@ -52,86 +47,6 @@ export default function Layout({ children }: LayoutProps) {
)
}
-function LiveShareBanner() {
- const [videoLoaded, setVideoLoaded] = useState(false)
-
- return (
-
-
New: Connect to your in-browser databases from outside the browser.
-
-
- )
-}
-
function RenameBanner() {
const { setIsRenameDialogOpen } = useApp()
return (
diff --git a/apps/postgres-new/components/model-provider/set-model-provider-dialog.tsx b/apps/postgres-new/components/model-provider/set-model-provider-dialog.tsx
new file mode 100644
index 00000000..0ca8758a
--- /dev/null
+++ b/apps/postgres-new/components/model-provider/set-model-provider-dialog.tsx
@@ -0,0 +1,266 @@
+'use client'
+
+import { zodResolver } from '@hookform/resolvers/zod'
+import { m } from 'framer-motion'
+import { Brain, Expand } from 'lucide-react'
+import { useState } from 'react'
+import { useForm, useWatch } from 'react-hook-form'
+import { z } from 'zod'
+import { useApp } from '~/components/app-provider'
+import { Button, ButtonProps } from '~/components/ui/button'
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from '~/components/ui/dialog'
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from '~/components/ui/form'
+import { Input } from '~/components/ui/input'
+import { Switch } from '~/components/ui/switch'
+import { Textarea } from '~/components/ui/textarea'
+import { getProviderUrl } from '~/lib/llm-provider'
+import { getSystemPrompt } from '~/lib/system-prompt'
+
+const formSchema = z.object({
+ apiKey: z
+ .string()
+ .transform((str) => (str === '' ? undefined : str))
+ .optional(),
+ baseUrl: z.string().min(1),
+ model: z.string().min(1),
+ system: z.string().min(1),
+ enabled: z.boolean(),
+})
+
+type FormSchema = z.infer
+
+function SetModelProviderForm(props: { id: string; onSubmit: (values: FormSchema) => void }) {
+ const { modelProvider } = useApp()
+
+ const form = useForm({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ enabled: false,
+ system: getSystemPrompt(),
+ ...modelProvider.state,
+ },
+ })
+
+ const isEnabled = useWatch({ control: form.control, name: 'enabled' })
+
+ const [isPromptExpanded, setIsPromptExpanded] = useState(false)
+
+ async function onSubmit(values: z.infer) {
+ await modelProvider.set(values)
+ props.onSubmit(values)
+ }
+
+ return (
+
+
+ )
+}
+
+function MiniButton({ children, ...props }: ButtonProps) {
+ return (
+
+ )
+}
+
+export type SetModelProviderDialogProps = {
+ open: boolean
+ onOpenChange: (open: boolean) => void
+ onConfirm?: () => void
+}
+
+export function SetModelProviderDialog(props: SetModelProviderDialogProps) {
+ return (
+
+ )
+}
diff --git a/apps/postgres-new/components/model-provider/use-model-provider.ts b/apps/postgres-new/components/model-provider/use-model-provider.ts
new file mode 100644
index 00000000..ff093582
--- /dev/null
+++ b/apps/postgres-new/components/model-provider/use-model-provider.ts
@@ -0,0 +1,48 @@
+import { useEffect, useState, useCallback } from 'react'
+import * as kv from 'idb-keyval'
+
+export type ModelProvider = {
+ apiKey?: string
+ model: string
+ baseUrl: string
+ system: string
+ enabled: boolean
+}
+
+let configStore: kv.UseStore
+
+export function getConfigStore() {
+ if (configStore) {
+ return configStore
+ }
+ configStore = kv.createStore('/database.build/config', 'config')
+ return configStore
+}
+
+export function useModelProvider() {
+ const [modelProvider, setModelProvider] = useState()
+
+ const set = useCallback(async (modelProvider: ModelProvider) => {
+ await kv.set('modelProvider', modelProvider, getConfigStore())
+ setModelProvider(modelProvider)
+ }, [])
+
+ const remove = useCallback(async () => {
+ await kv.del('modelProvider', getConfigStore())
+ setModelProvider(undefined)
+ }, [])
+
+ useEffect(() => {
+ async function init() {
+ const modelProvider = await kv.get('modelProvider', getConfigStore())
+ setModelProvider(modelProvider)
+ }
+ init()
+ }, [setModelProvider])
+
+ return {
+ state: modelProvider,
+ set,
+ delete: remove,
+ }
+}
diff --git a/apps/postgres-new/components/providers.tsx b/apps/postgres-new/components/providers.tsx
index ace9377d..4581158b 100644
--- a/apps/postgres-new/components/providers.tsx
+++ b/apps/postgres-new/components/providers.tsx
@@ -2,14 +2,28 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
-import { PropsWithChildren } from 'react'
+import { PropsWithChildren, useEffect } from 'react'
import AppProvider from './app-provider'
import { LockProvider } from './lock-provider'
import { ThemeProvider } from './theme-provider'
const queryClient = new QueryClient()
+async function registerServiceWorker() {
+ try {
+ await navigator.serviceWorker.register('/sw.mjs')
+ } catch (error) {
+ console.error('Failed to register service worker', error)
+ }
+}
+
export default function Providers({ children }: PropsWithChildren) {
+ useEffect(() => {
+ if ('serviceWorker' in navigator) {
+ registerServiceWorker()
+ }
+ }, [])
+
return (
diff --git a/apps/postgres-new/components/sidebar/database-menu-item.tsx b/apps/postgres-new/components/sidebar/database-menu-item.tsx
index 8dbccf35..1c19cc36 100644
--- a/apps/postgres-new/components/sidebar/database-menu-item.tsx
+++ b/apps/postgres-new/components/sidebar/database-menu-item.tsx
@@ -337,26 +337,33 @@ export function DatabaseMenuItem({ database, isActive, onClick }: DatabaseMenuIt
Download
-
- {isDeploying ? (
-
- ) : (
-
- )}
- Deploy
-
+
+
+
+ {isDeploying ? (
+
+ ) : (
+
+ )}
+ Deploy
+
+
+
+ {!user && Sign in to deploy}
+
+
{
- e.preventDefault()
- if (liveShare.isLiveSharing) {
- liveShare.stop()
- }
- liveShare.start(props.databaseId)
- router.push(`/db/${props.databaseId}`)
- props.onStart?.()
- }}
- >
-
- Live Share
-
+
+
+ {
+ e.preventDefault()
+ if (liveShare.isLiveSharing) {
+ liveShare.stop()
+ }
+ liveShare.start(props.databaseId)
+ router.push(`/db/${props.databaseId}`)
+ props.onStart?.()
+ }}
+ >
+
+ Live Share
+
+
+
+ {!user && Sign in to live share}
+
+
)
}
diff --git a/apps/postgres-new/components/sidebar/index.tsx b/apps/postgres-new/components/sidebar/index.tsx
index c632e251..d9980afc 100644
--- a/apps/postgres-new/components/sidebar/index.tsx
+++ b/apps/postgres-new/components/sidebar/index.tsx
@@ -12,6 +12,7 @@ import {
} from 'lucide-react'
import { useParams, useRouter } from 'next/navigation'
import { useEffect, useState } from 'react'
+import GitHubIcon from '~/assets/github-icon'
import { useApp } from '~/components/app-provider'
import ThemeDropdown from '~/components/theme-dropdown'
import { Button } from '~/components/ui/button'
@@ -20,11 +21,13 @@ import { useMergedDatabases } from '~/data/merged-databases/merged-databases'
import { useBreakpoint } from '~/lib/use-breakpoint'
import { cn } from '~/lib/utils'
import { DatabaseMenuItem } from './database-menu-item'
+import { SetExternalModelProviderButton } from './set-external-model-provider-button'
import { SignInDialog } from './sign-in-dialog'
export default function Sidebar() {
const {
user,
+ signIn,
signOut,
focusRef,
isSignInDialogOpen,
@@ -32,6 +35,7 @@ export default function Sidebar() {
setIsRenameDialogOpen,
isLegacyDomain,
liveShare,
+ modelProvider,
} = useApp()
let { id: currentDatabaseId } = useParams<{ id: string }>()
const router = useRouter()
@@ -45,6 +49,7 @@ export default function Sidebar() {
}, [isSmallBreakpoint])
const { data: databases, isLoading: isLoadingDatabases } = useMergedDatabases()
+ const isAuthRequired = user === undefined && modelProvider.state?.enabled !== true
return (
<>
@@ -86,7 +91,7 @@ export default function Sidebar() {
)}
+
- {user && (
+ {user ? (
+ ) : (
+
+
+
)}
)}
@@ -210,7 +229,7 @@ export default function Sidebar() {
+
Toggle theme
- {user && (
+ {user ? (
Sign out
+ ) : (
+
+
+
+
+
+
+
+ Sign in with GitHub
+
+
)}
diff --git a/apps/postgres-new/components/sidebar/set-external-model-provider-button.tsx b/apps/postgres-new/components/sidebar/set-external-model-provider-button.tsx
new file mode 100644
index 00000000..29e428c7
--- /dev/null
+++ b/apps/postgres-new/components/sidebar/set-external-model-provider-button.tsx
@@ -0,0 +1,56 @@
+import { m } from 'framer-motion'
+import { Brain } from 'lucide-react'
+import { useApp } from '~/components/app-provider'
+import { SetModelProviderDialog } from '~/components/model-provider/set-model-provider-dialog'
+import { Button } from '~/components/ui/button'
+import { Tooltip, TooltipContent, TooltipTrigger } from '~/components/ui/tooltip'
+
+type SetExternalModelProviderButtonProps = {
+ collapsed?: boolean
+}
+
+export function SetExternalModelProviderButton(props: SetExternalModelProviderButtonProps) {
+ const { modelProvider, isModelProviderDialogOpen, setIsModelProviderDialogOpen } = useApp()
+
+ const modelName = modelProvider.state?.model.split('/').at(-1)
+ const text = modelProvider.state?.enabled ? modelName : 'Bring your own LLM'
+ const button = props.collapsed ? (
+
+
+
+
+
+
+
+ {text}
+
+
+ ) : (
+
+
+
+ )
+
+ return (
+ <>
+
+ {button}
+ >
+ )
+}
diff --git a/apps/postgres-new/components/sidebar/sign-in-dialog.tsx b/apps/postgres-new/components/sidebar/sign-in-dialog.tsx
index 115c8da3..4a428910 100644
--- a/apps/postgres-new/components/sidebar/sign-in-dialog.tsx
+++ b/apps/postgres-new/components/sidebar/sign-in-dialog.tsx
@@ -1,3 +1,4 @@
+import ByoLlmButton from '~/components/byo-llm-button'
import SignInButton from '~/components/sign-in-button'
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '~/components/ui/dialog'
@@ -29,8 +30,15 @@ export function SignInDialog({ open, onOpenChange }: SignInDialogProps) {
database interactions).
We ask you to sign in to prevent API abuse.
-
+
+
+ or
+ {
+ onOpenChange(false)
+ }}
+ />
diff --git a/apps/postgres-new/components/ui/form.tsx b/apps/postgres-new/components/ui/form.tsx
new file mode 100644
index 00000000..37930795
--- /dev/null
+++ b/apps/postgres-new/components/ui/form.tsx
@@ -0,0 +1,178 @@
+"use client"
+
+import * as React from "react"
+import * as LabelPrimitive from "@radix-ui/react-label"
+import { Slot } from "@radix-ui/react-slot"
+import {
+ Controller,
+ ControllerProps,
+ FieldPath,
+ FieldValues,
+ FormProvider,
+ useFormContext,
+} from "react-hook-form"
+
+import { cn } from "~/lib/utils"
+import { Label } from "~/components/ui/label"
+
+const Form = FormProvider
+
+type FormFieldContextValue<
+ TFieldValues extends FieldValues = FieldValues,
+ TName extends FieldPath
= FieldPath
+> = {
+ name: TName
+}
+
+const FormFieldContext = React.createContext(
+ {} as FormFieldContextValue
+)
+
+const FormField = <
+ TFieldValues extends FieldValues = FieldValues,
+ TName extends FieldPath = FieldPath
+>({
+ ...props
+}: ControllerProps) => {
+ return (
+
+
+
+ )
+}
+
+const useFormField = () => {
+ const fieldContext = React.useContext(FormFieldContext)
+ const itemContext = React.useContext(FormItemContext)
+ const { getFieldState, formState } = useFormContext()
+
+ const fieldState = getFieldState(fieldContext.name, formState)
+
+ if (!fieldContext) {
+ throw new Error("useFormField should be used within ")
+ }
+
+ const { id } = itemContext
+
+ return {
+ id,
+ name: fieldContext.name,
+ formItemId: `${id}-form-item`,
+ formDescriptionId: `${id}-form-item-description`,
+ formMessageId: `${id}-form-item-message`,
+ ...fieldState,
+ }
+}
+
+type FormItemContextValue = {
+ id: string
+}
+
+const FormItemContext = React.createContext(
+ {} as FormItemContextValue
+)
+
+const FormItem = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes
+>(({ className, ...props }, ref) => {
+ const id = React.useId()
+
+ return (
+
+
+
+ )
+})
+FormItem.displayName = "FormItem"
+
+const FormLabel = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => {
+ const { error, formItemId } = useFormField()
+
+ return (
+
+ )
+})
+FormLabel.displayName = "FormLabel"
+
+const FormControl = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ ...props }, ref) => {
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
+
+ return (
+
+ )
+})
+FormControl.displayName = "FormControl"
+
+const FormDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes
+>(({ className, ...props }, ref) => {
+ const { formDescriptionId } = useFormField()
+
+ return (
+
+ )
+})
+FormDescription.displayName = "FormDescription"
+
+const FormMessage = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes
+>(({ className, children, ...props }, ref) => {
+ const { error, formMessageId } = useFormField()
+ const body = error ? String(error?.message) : children
+
+ if (!body) {
+ return null
+ }
+
+ return (
+
+ {body}
+
+ )
+})
+FormMessage.displayName = "FormMessage"
+
+export {
+ useFormField,
+ Form,
+ FormItem,
+ FormLabel,
+ FormControl,
+ FormDescription,
+ FormMessage,
+ FormField,
+}
diff --git a/apps/postgres-new/components/ui/switch.tsx b/apps/postgres-new/components/ui/switch.tsx
new file mode 100644
index 00000000..f53c755e
--- /dev/null
+++ b/apps/postgres-new/components/ui/switch.tsx
@@ -0,0 +1,29 @@
+"use client"
+
+import * as React from "react"
+import * as SwitchPrimitives from "@radix-ui/react-switch"
+
+import { cn } from "~/lib/utils"
+
+const Switch = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+
+
+))
+Switch.displayName = SwitchPrimitives.Root.displayName
+
+export { Switch }
diff --git a/apps/postgres-new/components/ui/textarea.tsx b/apps/postgres-new/components/ui/textarea.tsx
new file mode 100644
index 00000000..f88c1394
--- /dev/null
+++ b/apps/postgres-new/components/ui/textarea.tsx
@@ -0,0 +1,22 @@
+import * as React from "react"
+
+import { cn } from "~/lib/utils"
+
+const Textarea = React.forwardRef<
+ HTMLTextAreaElement,
+ React.ComponentProps<"textarea">
+>(({ className, ...props }, ref) => {
+ return (
+
+ )
+})
+Textarea.displayName = "Textarea"
+
+export { Textarea }
diff --git a/apps/postgres-new/components/workspace.tsx b/apps/postgres-new/components/workspace.tsx
index cb3f156e..f1ee3136 100644
--- a/apps/postgres-new/components/workspace.tsx
+++ b/apps/postgres-new/components/workspace.tsx
@@ -61,11 +61,18 @@ export default function Workspace({
onReply,
onCancelReply,
}: WorkspaceProps) {
- const { setIsRateLimited } = useApp()
+ const { setIsRateLimited, modelProvider, setModelProviderError } = useApp()
const isSmallBreakpoint = useBreakpoint('lg')
const onToolCall = useOnToolCall(databaseId)
const { mutateAsync: saveMessage } = useMessageCreateMutation(databaseId)
+ const apiInfo = modelProvider.state?.enabled
+ ? {
+ apiUrl: modelProvider.state.baseUrl,
+ model: modelProvider.state.model,
+ }
+ : undefined
+
const { data: tables, isLoading: isLoadingSchema } = useTablesQuery({
databaseId,
schemas: ['public', 'meta'],
@@ -77,7 +84,7 @@ export default function Workspace({
const { messages, setMessages, append, stop } = useChat({
id: databaseId,
api: '/api/chat',
- maxToolRoundtrips: 10,
+ maxSteps: 10,
keepLastMessageOnError: true,
onToolCall: onToolCall as any, // our `OnToolCall` type is more specific than `ai` SDK's
body: {
@@ -86,9 +93,23 @@ export default function Workspace({
initialMessages:
existingMessages && existingMessages.length > 0 ? existingMessages : initialMessages,
async onFinish(message) {
+ setModelProviderError(undefined)
+
// Order is important here
await onReply?.(message, append)
- await saveMessage({ message })
+ await saveMessage({
+ message: {
+ ...message,
+ ...apiInfo,
+ },
+ })
+ },
+ onError(error) {
+ if (modelProvider.state?.enabled) {
+ setModelProviderError(error.message)
+ } else {
+ setModelProviderError(undefined)
+ }
},
async onResponse(response) {
setIsRateLimited(response.status === 429)
@@ -105,7 +126,12 @@ export default function Workspace({
// Intentionally don't await so that framer animations aren't affected
append(message)
- saveMessage({ message })
+ saveMessage({
+ message: {
+ ...message,
+ ...apiInfo,
+ },
+ })
onMessage?.(message, append)
},
[onMessage, setMessages, saveMessage, append]
diff --git a/apps/postgres-new/data/messages/message-create-mutation.ts b/apps/postgres-new/data/messages/message-create-mutation.ts
index e916317c..b6b798c9 100644
--- a/apps/postgres-new/data/messages/message-create-mutation.ts
+++ b/apps/postgres-new/data/messages/message-create-mutation.ts
@@ -1,6 +1,6 @@
import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react-query'
-import { Message } from 'ai'
import { useApp } from '~/components/app-provider'
+import { Message } from '~/lib/db'
import { getMessagesQueryKey } from './messages-query'
export type MessageCreateVariables = {
diff --git a/apps/postgres-new/lib/db/index.ts b/apps/postgres-new/lib/db/index.ts
index ca94e99c..e39847d4 100644
--- a/apps/postgres-new/lib/db/index.ts
+++ b/apps/postgres-new/lib/db/index.ts
@@ -1,7 +1,7 @@
import type { PGliteInterface, PGliteOptions, Transaction } from '@electric-sql/pglite'
import { raw, sql } from '@electric-sql/pglite/template'
import { PGliteWorker } from '@electric-sql/pglite/worker'
-import { Message, ToolInvocation } from 'ai'
+import { Message as AiMessage, ToolInvocation } from 'ai'
import { codeBlock } from 'common-tags'
import { nanoid } from 'nanoid'
@@ -21,6 +21,11 @@ export type MetaMessage = {
createdAt: Date
}
+export type Message = AiMessage & {
+ apiUrl?: string
+ model?: string
+}
+
export class DbManager {
runtimePgVersion: string | undefined
prefix = 'playground'
@@ -88,31 +93,38 @@ export class DbManager {
async getMessages(databaseId: string) {
const metaDb = await this.getMetaDb()
- const { rows: messages } = await metaDb.query(
- codeBlock`
- select id, role, content, tool_invocations as "toolInvocations", created_at as "createdAt"
- from messages where database_id = $1
- order by created_at asc
- `,
- [databaseId]
- )
+ const { rows: messages } = await metaDb.sql`
+ select
+ id,
+ role,
+ content,
+ tool_invocations as "toolInvocations",
+ created_at as "createdAt",
+ api_url as "apiUrl",
+ model
+ from messages
+ where database_id = ${databaseId}
+ order by created_at asc
+ `
+
return messages
}
async createMessage(databaseId: string, message: Message) {
const metaDb = await this.getMetaDb()
- if (message.toolInvocations) {
- await metaDb.query(
- 'insert into messages (id, database_id, role, content, tool_invocations) values ($1, $2, $3, $4, $5)',
- [message.id, databaseId, message.role, message.content, message.toolInvocations]
- )
- } else {
- await metaDb.query(
- 'insert into messages (id, database_id, role, content) values ($1, $2, $3, $4)',
- [message.id, databaseId, message.role, message.content]
+ await metaDb.sql`
+ insert into messages (id, database_id, role, content, tool_invocations, api_url, model)
+ values (
+ ${message.id},
+ ${databaseId},
+ ${message.role},
+ ${message.content},
+ ${message.toolInvocations},
+ ${message.apiUrl},
+ ${message.model}
)
- }
+ `
}
async exportMessages() {
@@ -493,6 +505,14 @@ const metaMigrations: Migration[] = [
);
`,
},
+ {
+ version: '202411250001',
+ name: 'message_model',
+ sql: codeBlock`
+ alter table messages add column api_url text;
+ alter table messages add column model text;
+ `,
+ },
].sort()
const migrations: Migration[] = [
diff --git a/apps/postgres-new/lib/llm-provider.ts b/apps/postgres-new/lib/llm-provider.ts
new file mode 100644
index 00000000..2ea277f5
--- /dev/null
+++ b/apps/postgres-new/lib/llm-provider.ts
@@ -0,0 +1,27 @@
+const providerUrlMap = new Map([
+ ['openai', 'https://api.openai.com/v1'],
+ ['x-ai', 'https://api.x.ai/v1'],
+ ['openrouter', 'https://openrouter.ai/api/v1'],
+] as const)
+
+type MapKeys = T extends Map ? K : never
+
+export type Provider = MapKeys
+
+export function getProviderUrl(provider: Provider) {
+ const url = providerUrlMap.get(provider)
+
+ if (!url) {
+ throw new Error(`unknown provider: ${provider}`)
+ }
+
+ return url
+}
+
+export function getProviderId(apiUrl: string): Provider | undefined {
+ for (const [key, value] of providerUrlMap.entries()) {
+ if (value === apiUrl) {
+ return key
+ }
+ }
+}
diff --git a/apps/postgres-new/lib/system-prompt.ts b/apps/postgres-new/lib/system-prompt.ts
new file mode 100644
index 00000000..4abdaf9b
--- /dev/null
+++ b/apps/postgres-new/lib/system-prompt.ts
@@ -0,0 +1,48 @@
+import { codeBlock } from 'common-tags'
+
+export function getSystemPrompt(options?: { maxRowLimit?: number }) {
+ const { maxRowLimit = 100 } = options ?? {}
+
+ return codeBlock`
+ You are a helpful database assistant. Under the hood you have access to an in-browser Postgres database called PGlite (https://github.com/electric-sql/pglite).
+ Some special notes about this database:
+ - foreign data wrappers are not supported
+ - the following extensions are available:
+ - plpgsql [pre-enabled]
+ - vector (https://github.com/pgvector/pgvector) [pre-enabled]
+ - use <=> for cosine distance (default to this)
+ - use <#> for negative inner product
+ - use <-> for L2 distance
+ - use <+> for L1 distance
+ - note queried vectors will be truncated/redacted due to their size - export as CSV if the full vector is required
+
+ When generating tables, do the following:
+ - For primary keys, always use "id bigint primary key generated always as identity" (not serial)
+ - Prefer 'text' over 'varchar'
+ - Keep explanations brief but helpful
+ - Don't repeat yourself after creating the table
+
+ When creating sample data:
+ - Make the data realistic, including joined data
+ - Check for existing records/conflicts in the table
+
+ When querying data, limit to 5 by default. The maximum number of rows you're allowed to fetch is ${maxRowLimit} (to protect AI from token abuse).
+ If the user needs to fetch more than ${maxRowLimit} rows at once, they can export the query as a CSV.
+
+ When performing FTS, always use 'simple' (languages aren't available).
+
+ When importing CSVs try to solve the problem yourself (eg. use a generic text column, then refine)
+ vs. asking the user to change the CSV. No need to select rows after importing.
+
+ You also know math. All math equations and expressions must be written in KaTex and must be wrapped in double dollar \`$$\`:
+ - Inline: $$\\sqrt{26}$$
+ - Multiline:
+ $$
+ \\sqrt{26}
+ $$
+
+ No images are allowed. Do not try to generate or link images, including base64 data URLs.
+
+ Feel free to suggest corrections for suspected typos.
+ `
+}
diff --git a/apps/postgres-new/lib/tools.ts b/apps/postgres-new/lib/tools.ts
index 8b51b02c..db376812 100644
--- a/apps/postgres-new/lib/tools.ts
+++ b/apps/postgres-new/lib/tools.ts
@@ -1,7 +1,7 @@
import { CoreTool } from 'ai'
import { codeBlock } from 'common-tags'
import { z } from 'zod'
-import { reportSchema, resultsSchema, tableSchema, tabsSchema } from './schema'
+import { reportSchema, resultsSchema, tableSchema } from './schema'
const successResultSchema = z.object({
success: z.literal(true),
diff --git a/apps/postgres-new/package.json b/apps/postgres-new/package.json
index ff03b10c..eb061913 100644
--- a/apps/postgres-new/package.json
+++ b/apps/postgres-new/package.json
@@ -3,19 +3,21 @@
"version": "0.0.0",
"private": true,
"scripts": {
- "dev": "next dev",
- "build": "next build",
+ "dev": "npm run build:sw && next dev",
+ "build": "npm run build:sw && next build",
+ "build:sw": "vite build",
"start": "next start",
"lint": "next lint",
"check-types": "tsc --noEmit",
"generate:database-types": "supabase gen types --lang=typescript --local > utils/supabase/db-types.ts"
},
"dependencies": {
- "@ai-sdk/openai": "^0.0.21",
+ "@ai-sdk/openai": "^1.0.4",
"@dagrejs/dagre": "^1.1.2",
"@database.build/deploy": "*",
"@electric-sql/pglite": "^0.2.9",
"@gregnr/postgres-meta": "^0.82.0-dev.2",
+ "@hookform/resolvers": "^3.9.1",
"@monaco-editor/react": "^4.6.0",
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-alert-dialog": "^1.1.2",
@@ -25,6 +27,7 @@
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
+ "@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@std/tar": "npm:@jsr/std__tar@^0.1.2",
@@ -35,7 +38,7 @@
"@upstash/ratelimit": "^2.0.1",
"@vercel/kv": "^2.0.0",
"@xenova/transformers": "^2.17.2",
- "ai": "^3.2.8",
+ "ai": "^4.0.3",
"async-mutex": "^0.5.0",
"chart.js": "^4.4.3",
"chartjs-adapter-date-fns": "^3.0.0",
@@ -46,6 +49,7 @@
"date-fns": "^3.6.0",
"framer-motion": "^11.2.10",
"highlightjs-curl": "^1.3.0",
+ "idb-keyval": "^6.2.1",
"katex": "^0.16.10",
"libpg-query": "npm:@gregnr/libpg-query@15.2.0-rc.deparse.3",
"lodash": "^4.17.21",
@@ -54,10 +58,12 @@
"nanoid": "^5.0.7",
"next": "14.2.3",
"next-themes": "^0.3.0",
+ "ollama-ai-provider": "^0.16.1",
"react": "^18",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18",
"react-error-boundary": "^4.0.13",
+ "react-hook-form": "^7.53.2",
"react-markdown": "^9.0.1",
"react-syntax-highlighter": "^15.5.0",
"react-use": "^17.5.1",
@@ -92,6 +98,7 @@
"tailwindcss": "^3.4.6",
"tailwindcss-radix": "^3.0.3",
"typescript": "^5.5.2",
+ "vite": "^5.4.11",
"webpack": "^5.95.0"
}
}
diff --git a/apps/postgres-new/sw.ts b/apps/postgres-new/sw.ts
new file mode 100644
index 00000000..5b4d3b4b
--- /dev/null
+++ b/apps/postgres-new/sw.ts
@@ -0,0 +1,59 @@
+import { createOpenAI } from '@ai-sdk/openai'
+import { convertToCoreMessages, streamText, ToolInvocation } from 'ai'
+import * as kv from 'idb-keyval'
+import { getConfigStore, type ModelProvider } from '~/components/model-provider/use-model-provider'
+import { convertToCoreTools, maxMessageContext, tools } from '~/lib/tools'
+
+type Message = {
+ role: 'user' | 'assistant'
+ content: string
+ toolInvocations?: (ToolInvocation & { result: any })[]
+}
+
+declare const self: ServiceWorkerGlobalScope
+
+async function handleRequest(event: FetchEvent) {
+ const url = new URL(event.request.url)
+ const isChatRoute = url.pathname.startsWith('/api/chat') && event.request.method === 'POST'
+ if (isChatRoute) {
+ const modelProvider = await kv.get('modelProvider', getConfigStore())
+
+ if (!modelProvider?.enabled) {
+ return fetch(event.request)
+ }
+
+ const adapter = createOpenAI({
+ baseURL: modelProvider.baseUrl,
+ apiKey: modelProvider.apiKey,
+ })
+
+ const model = adapter(modelProvider.model)
+
+ const { messages }: { messages: Message[] } = await event.request.json()
+
+ // Trim the message context sent to the LLM to mitigate token abuse
+ const trimmedMessageContext = messages.slice(-maxMessageContext)
+
+ const coreMessages = convertToCoreMessages(trimmedMessageContext)
+ const coreTools = convertToCoreTools(tools)
+
+ try {
+ const result = streamText({
+ system: modelProvider.system,
+ model,
+ messages: coreMessages,
+ tools: coreTools,
+ })
+
+ return result.toDataStreamResponse()
+ } catch (error) {
+ return new Response(`Error streaming LLM from service worker: ${error}`, { status: 500 })
+ }
+ }
+
+ return fetch(event.request)
+}
+
+self.addEventListener('fetch', (event) => {
+ event.respondWith(handleRequest(event))
+})
diff --git a/apps/postgres-new/tsconfig.json b/apps/postgres-new/tsconfig.json
index d506c8ec..1d9a74de 100644
--- a/apps/postgres-new/tsconfig.json
+++ b/apps/postgres-new/tsconfig.json
@@ -1,9 +1,10 @@
{
"compilerOptions": {
- "lib": ["dom", "dom.iterable", "esnext"],
+ "lib": ["dom", "dom.iterable", "esnext", "webworker"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
+ "target": "ES2015",
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
@@ -21,6 +22,13 @@
"~/*": ["./*"]
}
},
- "include": ["next-env.d.ts", "global.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "include": [
+ "next-env.d.ts",
+ "global.d.ts",
+ "**/*.ts",
+ "**/*.tsx",
+ ".next/types/**/*.ts",
+ "vite.config.mts"
+ ],
"exclude": ["node_modules"]
}
diff --git a/apps/postgres-new/vite.config.mts b/apps/postgres-new/vite.config.mts
new file mode 100644
index 00000000..3c1c76cd
--- /dev/null
+++ b/apps/postgres-new/vite.config.mts
@@ -0,0 +1,23 @@
+import { fileURLToPath } from 'node:url'
+import { defineConfig } from 'vite'
+
+export default defineConfig({
+ define: {
+ 'process.env': {},
+ },
+ resolve: {
+ alias: {
+ '~': fileURLToPath(new URL('.', import.meta.url)),
+ },
+ },
+ build: {
+ lib: {
+ entry: fileURLToPath(new URL('sw.ts', import.meta.url)),
+ fileName: 'sw',
+ formats: ['es'],
+ },
+ outDir: fileURLToPath(new URL('public', import.meta.url)),
+ emptyOutDir: false,
+ copyPublicDir: false,
+ },
+})
diff --git a/package-lock.json b/package-lock.json
index 1b685183..85e35d2f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -111,11 +111,12 @@
"name": "@database.build/web",
"version": "0.0.0",
"dependencies": {
- "@ai-sdk/openai": "^0.0.21",
+ "@ai-sdk/openai": "^1.0.4",
"@dagrejs/dagre": "^1.1.2",
"@database.build/deploy": "*",
"@electric-sql/pglite": "^0.2.9",
"@gregnr/postgres-meta": "^0.82.0-dev.2",
+ "@hookform/resolvers": "^3.9.1",
"@monaco-editor/react": "^4.6.0",
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-alert-dialog": "^1.1.2",
@@ -125,6 +126,7 @@
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
+ "@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@std/tar": "npm:@jsr/std__tar@^0.1.2",
@@ -135,7 +137,7 @@
"@upstash/ratelimit": "^2.0.1",
"@vercel/kv": "^2.0.0",
"@xenova/transformers": "^2.17.2",
- "ai": "^3.2.8",
+ "ai": "^4.0.3",
"async-mutex": "^0.5.0",
"chart.js": "^4.4.3",
"chartjs-adapter-date-fns": "^3.0.0",
@@ -146,6 +148,7 @@
"date-fns": "^3.6.0",
"framer-motion": "^11.2.10",
"highlightjs-curl": "^1.3.0",
+ "idb-keyval": "^6.2.1",
"katex": "^0.16.10",
"libpg-query": "npm:@gregnr/libpg-query@15.2.0-rc.deparse.3",
"lodash": "^4.17.21",
@@ -154,10 +157,12 @@
"nanoid": "^5.0.7",
"next": "14.2.3",
"next-themes": "^0.3.0",
+ "ollama-ai-provider": "^0.16.1",
"react": "^18",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18",
"react-error-boundary": "^4.0.13",
+ "react-hook-form": "^7.53.2",
"react-markdown": "^9.0.1",
"react-syntax-highlighter": "^15.5.0",
"react-use": "^17.5.1",
@@ -192,6 +197,7 @@
"tailwindcss": "^3.4.6",
"tailwindcss-radix": "^3.0.3",
"typescript": "^5.5.2",
+ "vite": "^5.4.11",
"webpack": "^5.95.0"
}
},
@@ -233,13 +239,13 @@
}
},
"node_modules/@ai-sdk/openai": {
- "version": "0.0.21",
- "resolved": "https://registry.npmjs.org/@ai-sdk/openai/-/openai-0.0.21.tgz",
- "integrity": "sha512-k1sLRDKIsiHFuwPa9xBm4oQZ7JQVPE9+KzwP/E4v4zGwsL8Sp5gt+OTccP5cECVhDcRKDYaj0wXtCcmFyAh5uA==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/openai/-/openai-1.0.4.tgz",
+ "integrity": "sha512-3QpgKmkCeJvUdeu3sVRL/ZKWzg8biO0tN2owQW/lFV95o8qskE3bN95R9H136Mmu0124/C28aY6ScxO93nUrtg==",
"license": "Apache-2.0",
"dependencies": {
- "@ai-sdk/provider": "0.0.9",
- "@ai-sdk/provider-utils": "0.0.12"
+ "@ai-sdk/provider": "1.0.1",
+ "@ai-sdk/provider-utils": "2.0.2"
},
"engines": {
"node": ">=18"
@@ -249,27 +255,27 @@
}
},
"node_modules/@ai-sdk/provider": {
- "version": "0.0.9",
- "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-0.0.9.tgz",
- "integrity": "sha512-SJX9J+wiur/EVSYZ6lHV33YWB/yeZ+RCGg+8gSsKzrxEUCh+TkqM5Af7cw2hDFv65dXyeNOZHhfINoD9StEm6A==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-1.0.1.tgz",
+ "integrity": "sha512-mV+3iNDkzUsZ0pR2jG0sVzU6xtQY5DtSCBy3JFycLp6PwjyLw/iodfL3MwdmMCRJWgs3dadcHejRnMvF9nGTBg==",
"license": "Apache-2.0",
"dependencies": {
- "json-schema": "0.4.0"
+ "json-schema": "^0.4.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@ai-sdk/provider-utils": {
- "version": "0.0.12",
- "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-0.0.12.tgz",
- "integrity": "sha512-jt3RwW68x+fVPrsmcKR3RT+G+ISgsO7mu/M+kCnZmxR4JtbypgS/JsAtnnoD7YtAcqLplbYBzJEsRW4CRqIWMQ==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-2.0.2.tgz",
+ "integrity": "sha512-IAvhKhdlXqiSmvx/D4uNlFYCl8dWT+M9K+IuEcSgnE2Aj27GWu8sDIpAf4r4Voc+wOUkOECVKQhFo8g9pozdjA==",
"license": "Apache-2.0",
"dependencies": {
- "@ai-sdk/provider": "0.0.9",
- "eventsource-parser": "1.1.2",
- "nanoid": "3.3.6",
- "secure-json-parse": "2.7.0"
+ "@ai-sdk/provider": "1.0.1",
+ "eventsource-parser": "^3.0.0",
+ "nanoid": "^3.3.7",
+ "secure-json-parse": "^2.7.0"
},
"engines": {
"node": ">=18"
@@ -284,18 +290,21 @@
}
},
"node_modules/@ai-sdk/react": {
- "version": "0.0.26",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/react/-/react-1.0.2.tgz",
+ "integrity": "sha512-VQfQ6PMiUz4hDquAfjih0DIw4gsQvRFk91SFg2xWirDO4swMZByJzqGGcILPQKbww5ndCo48iZj9S1mLKZo5Dg==",
"license": "Apache-2.0",
"dependencies": {
- "@ai-sdk/provider-utils": "1.0.2",
- "@ai-sdk/ui-utils": "0.0.17",
- "swr": "2.2.5"
+ "@ai-sdk/provider-utils": "2.0.2",
+ "@ai-sdk/ui-utils": "1.0.2",
+ "swr": "^2.2.5",
+ "throttleit": "2.1.0"
},
"engines": {
"node": ">=18"
},
"peerDependencies": {
- "react": "^18 || ^19",
+ "react": "^18 || ^19 || ^19.0.0-rc",
"zod": "^3.0.0"
},
"peerDependenciesMeta": {
@@ -307,194 +316,15 @@
}
}
},
- "node_modules/@ai-sdk/react/node_modules/@ai-sdk/provider": {
- "version": "0.0.12",
- "license": "Apache-2.0",
- "dependencies": {
- "json-schema": "0.4.0"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@ai-sdk/react/node_modules/@ai-sdk/provider-utils": {
- "version": "1.0.2",
- "license": "Apache-2.0",
- "dependencies": {
- "@ai-sdk/provider": "0.0.12",
- "eventsource-parser": "1.1.2",
- "nanoid": "3.3.6",
- "secure-json-parse": "2.7.0"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "zod": "^3.0.0"
- },
- "peerDependenciesMeta": {
- "zod": {
- "optional": true
- }
- }
- },
- "node_modules/@ai-sdk/solid": {
- "version": "0.0.19",
- "license": "Apache-2.0",
- "dependencies": {
- "@ai-sdk/ui-utils": "0.0.17"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "solid-js": "^1.7.7"
- },
- "peerDependenciesMeta": {
- "solid-js": {
- "optional": true
- }
- }
- },
- "node_modules/@ai-sdk/svelte": {
- "version": "0.0.20",
- "license": "Apache-2.0",
- "dependencies": {
- "@ai-sdk/provider-utils": "1.0.2",
- "@ai-sdk/ui-utils": "0.0.17",
- "sswr": "2.1.0"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "svelte": "^3.0.0 || ^4.0.0"
- },
- "peerDependenciesMeta": {
- "svelte": {
- "optional": true
- }
- }
- },
- "node_modules/@ai-sdk/svelte/node_modules/@ai-sdk/provider": {
- "version": "0.0.12",
- "license": "Apache-2.0",
- "dependencies": {
- "json-schema": "0.4.0"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@ai-sdk/svelte/node_modules/@ai-sdk/provider-utils": {
- "version": "1.0.2",
- "license": "Apache-2.0",
- "dependencies": {
- "@ai-sdk/provider": "0.0.12",
- "eventsource-parser": "1.1.2",
- "nanoid": "3.3.6",
- "secure-json-parse": "2.7.0"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "zod": "^3.0.0"
- },
- "peerDependenciesMeta": {
- "zod": {
- "optional": true
- }
- }
- },
"node_modules/@ai-sdk/ui-utils": {
- "version": "0.0.17",
- "license": "Apache-2.0",
- "dependencies": {
- "@ai-sdk/provider-utils": "1.0.2",
- "secure-json-parse": "2.7.0"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "zod": "^3.0.0"
- },
- "peerDependenciesMeta": {
- "zod": {
- "optional": true
- }
- }
- },
- "node_modules/@ai-sdk/ui-utils/node_modules/@ai-sdk/provider": {
- "version": "0.0.12",
- "license": "Apache-2.0",
- "dependencies": {
- "json-schema": "0.4.0"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@ai-sdk/ui-utils/node_modules/@ai-sdk/provider-utils": {
"version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/ui-utils/-/ui-utils-1.0.2.tgz",
+ "integrity": "sha512-hHrUdeThGHu/rsGZBWQ9PjrAU9Htxgbo9MFyR5B/aWoNbBeXn1HLMY1+uMEnXL5pRPlmyVRjgIavWg7UgeNDOw==",
"license": "Apache-2.0",
"dependencies": {
- "@ai-sdk/provider": "0.0.12",
- "eventsource-parser": "1.1.2",
- "nanoid": "3.3.6",
- "secure-json-parse": "2.7.0"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "zod": "^3.0.0"
- },
- "peerDependenciesMeta": {
- "zod": {
- "optional": true
- }
- }
- },
- "node_modules/@ai-sdk/vue": {
- "version": "0.0.21",
- "license": "Apache-2.0",
- "dependencies": {
- "@ai-sdk/provider-utils": "0.0.14",
- "@ai-sdk/ui-utils": "0.0.17",
- "swrv": "1.0.4"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "vue": "^3.3.4"
- },
- "peerDependenciesMeta": {
- "vue": {
- "optional": true
- }
- }
- },
- "node_modules/@ai-sdk/vue/node_modules/@ai-sdk/provider": {
- "version": "0.0.10",
- "license": "Apache-2.0",
- "dependencies": {
- "json-schema": "0.4.0"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@ai-sdk/vue/node_modules/@ai-sdk/provider-utils": {
- "version": "0.0.14",
- "license": "Apache-2.0",
- "dependencies": {
- "@ai-sdk/provider": "0.0.10",
- "eventsource-parser": "1.1.2",
- "nanoid": "3.3.6",
- "secure-json-parse": "2.7.0"
+ "@ai-sdk/provider": "1.0.1",
+ "@ai-sdk/provider-utils": "2.0.2",
+ "zod-to-json-schema": "^3.23.5"
},
"engines": {
"node": ">=18"
@@ -520,18 +350,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@ampproject/remapping": {
- "version": "2.3.0",
- "license": "Apache-2.0",
- "peer": true,
- "dependencies": {
- "@jridgewell/gen-mapping": "^0.3.5",
- "@jridgewell/trace-mapping": "^0.3.24"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
"node_modules/@aws-crypto/crc32": {
"version": "5.2.0",
"license": "Apache-2.0",
@@ -1452,17 +1270,6 @@
"node": ">=4"
}
},
- "node_modules/@babel/parser": {
- "version": "7.24.8",
- "license": "MIT",
- "peer": true,
- "bin": {
- "parser": "bin/babel-parser.js"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
"node_modules/@babel/runtime": {
"version": "7.24.8",
"license": "MIT",
@@ -2160,6 +1967,15 @@
"zod": "^3.19.1"
}
},
+ "node_modules/@hookform/resolvers": {
+ "version": "3.9.1",
+ "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.9.1.tgz",
+ "integrity": "sha512-ud2HqmGBM0P0IABqoskKWI6PEf6ZDDBZkFqe2Vnl+mTHCEHzr3ISjjZyCwTjC/qpL25JC9aIDkloQejvMeq0ug==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react-hook-form": "^7.0.0"
+ }
+ },
"node_modules/@huggingface/jinja": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.2.2.tgz",
@@ -3512,6 +3328,50 @@
}
}
},
+ "node_modules/@radix-ui/react-switch": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.1.1.tgz",
+ "integrity": "sha512-diPqDDoBcZPSicYoMWdWx+bCPuTRH4QSp9J+65IvtdS0Kuzt67bI6n32vCj8q6NZmYW/ah+2orOtMwcX5eQwIg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.0",
+ "@radix-ui/react-compose-refs": "1.1.0",
+ "@radix-ui/react-context": "1.1.1",
+ "@radix-ui/react-primitive": "2.0.0",
+ "@radix-ui/react-use-controllable-state": "1.1.0",
+ "@radix-ui/react-use-previous": "1.1.0",
+ "@radix-ui/react-use-size": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-context": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.1.tgz",
+ "integrity": "sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-tabs": {
"version": "1.1.0",
"license": "MIT",
@@ -3638,6 +3498,21 @@
}
}
},
+ "node_modules/@radix-ui/react-use-previous": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz",
+ "integrity": "sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-use-rect": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz",
@@ -5570,149 +5445,48 @@
"node": ">=14.6"
}
},
- "node_modules/@vue/compiler-core": {
- "version": "3.4.33",
+ "node_modules/@webassemblyjs/ast": {
+ "version": "1.12.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz",
+ "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==",
+ "dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
- "@babel/parser": "^7.24.7",
- "@vue/shared": "3.4.33",
- "entities": "^4.5.0",
- "estree-walker": "^2.0.2",
- "source-map-js": "^1.2.0"
+ "@webassemblyjs/helper-numbers": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6"
}
},
- "node_modules/@vue/compiler-core/node_modules/estree-walker": {
- "version": "2.0.2",
- "license": "MIT",
- "peer": true
+ "node_modules/@webassemblyjs/floating-point-hex-parser": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz",
+ "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/@vue/compiler-dom": {
- "version": "3.4.33",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@vue/compiler-core": "3.4.33",
- "@vue/shared": "3.4.33"
- }
+ "node_modules/@webassemblyjs/helper-api-error": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz",
+ "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@webassemblyjs/helper-buffer": {
+ "version": "1.12.1",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz",
+ "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/@vue/compiler-sfc": {
- "version": "3.4.33",
+ "node_modules/@webassemblyjs/helper-numbers": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz",
+ "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==",
+ "dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
- "@babel/parser": "^7.24.7",
- "@vue/compiler-core": "3.4.33",
- "@vue/compiler-dom": "3.4.33",
- "@vue/compiler-ssr": "3.4.33",
- "@vue/shared": "3.4.33",
- "estree-walker": "^2.0.2",
- "magic-string": "^0.30.10",
- "postcss": "^8.4.39",
- "source-map-js": "^1.2.0"
- }
- },
- "node_modules/@vue/compiler-sfc/node_modules/estree-walker": {
- "version": "2.0.2",
- "license": "MIT",
- "peer": true
- },
- "node_modules/@vue/compiler-ssr": {
- "version": "3.4.33",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@vue/compiler-dom": "3.4.33",
- "@vue/shared": "3.4.33"
- }
- },
- "node_modules/@vue/reactivity": {
- "version": "3.4.33",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@vue/shared": "3.4.33"
- }
- },
- "node_modules/@vue/runtime-core": {
- "version": "3.4.33",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@vue/reactivity": "3.4.33",
- "@vue/shared": "3.4.33"
- }
- },
- "node_modules/@vue/runtime-dom": {
- "version": "3.4.33",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@vue/reactivity": "3.4.33",
- "@vue/runtime-core": "3.4.33",
- "@vue/shared": "3.4.33",
- "csstype": "^3.1.3"
- }
- },
- "node_modules/@vue/server-renderer": {
- "version": "3.4.33",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@vue/compiler-ssr": "3.4.33",
- "@vue/shared": "3.4.33"
- },
- "peerDependencies": {
- "vue": "3.4.33"
- }
- },
- "node_modules/@vue/shared": {
- "version": "3.4.33",
- "license": "MIT",
- "peer": true
- },
- "node_modules/@webassemblyjs/ast": {
- "version": "1.12.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz",
- "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@webassemblyjs/helper-numbers": "1.11.6",
- "@webassemblyjs/helper-wasm-bytecode": "1.11.6"
- }
- },
- "node_modules/@webassemblyjs/floating-point-hex-parser": {
- "version": "1.11.6",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz",
- "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@webassemblyjs/helper-api-error": {
- "version": "1.11.6",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz",
- "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@webassemblyjs/helper-buffer": {
- "version": "1.12.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz",
- "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@webassemblyjs/helper-numbers": {
- "version": "1.11.6",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz",
- "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@webassemblyjs/floating-point-hex-parser": "1.11.6",
- "@webassemblyjs/helper-api-error": "1.11.6",
- "@xtuc/long": "4.2.2"
+ "@webassemblyjs/floating-point-hex-parser": "1.11.6",
+ "@webassemblyjs/helper-api-error": "1.11.6",
+ "@xtuc/long": "4.2.2"
}
},
"node_modules/@webassemblyjs/helper-wasm-bytecode": {
@@ -5892,6 +5666,7 @@
},
"node_modules/acorn": {
"version": "8.12.1",
+ "dev": true,
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
@@ -5958,75 +5733,30 @@
}
},
"node_modules/ai": {
- "version": "3.2.33",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/ai/-/ai-4.0.3.tgz",
+ "integrity": "sha512-nx5cNMldOQ72hwxL60NLtRnsmQd5Bo887Wznvxt8F5xnmjdeXRpz4ixp+0xGA88X7wiCn6c+xrhGEb9fesi/Tw==",
"license": "Apache-2.0",
"dependencies": {
- "@ai-sdk/provider": "0.0.12",
- "@ai-sdk/provider-utils": "1.0.2",
- "@ai-sdk/react": "0.0.26",
- "@ai-sdk/solid": "0.0.19",
- "@ai-sdk/svelte": "0.0.20",
- "@ai-sdk/ui-utils": "0.0.17",
- "@ai-sdk/vue": "0.0.21",
+ "@ai-sdk/provider": "1.0.1",
+ "@ai-sdk/provider-utils": "2.0.2",
+ "@ai-sdk/react": "1.0.2",
+ "@ai-sdk/ui-utils": "1.0.2",
"@opentelemetry/api": "1.9.0",
- "eventsource-parser": "1.1.2",
- "json-schema": "0.4.0",
"jsondiffpatch": "0.6.0",
- "nanoid": "3.3.6",
- "secure-json-parse": "2.7.0",
- "sswr": "2.1.0",
- "zod-to-json-schema": "3.22.5"
+ "zod-to-json-schema": "^3.23.5"
},
"engines": {
"node": ">=18"
},
"peerDependencies": {
- "openai": "^4.42.0",
- "react": "^18 || ^19",
- "svelte": "^3.0.0 || ^4.0.0",
+ "react": "^18 || ^19 || ^19.0.0-rc",
"zod": "^3.0.0"
},
"peerDependenciesMeta": {
- "openai": {
- "optional": true
- },
"react": {
"optional": true
},
- "svelte": {
- "optional": true
- },
- "zod": {
- "optional": true
- }
- }
- },
- "node_modules/ai/node_modules/@ai-sdk/provider": {
- "version": "0.0.12",
- "license": "Apache-2.0",
- "dependencies": {
- "json-schema": "0.4.0"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/ai/node_modules/@ai-sdk/provider-utils": {
- "version": "1.0.2",
- "license": "Apache-2.0",
- "dependencies": {
- "@ai-sdk/provider": "0.0.12",
- "eventsource-parser": "1.1.2",
- "nanoid": "3.3.6",
- "secure-json-parse": "2.7.0"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "zod": "^3.0.0"
- },
- "peerDependenciesMeta": {
"zod": {
"optional": true
}
@@ -7061,18 +6791,6 @@
"node": "^18.17.0 || >=20.5.0"
}
},
- "node_modules/code-red": {
- "version": "1.0.4",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@jridgewell/sourcemap-codec": "^1.4.15",
- "@types/estree": "^1.0.1",
- "acorn": "^8.10.0",
- "estree-walker": "^3.0.3",
- "periscopic": "^3.1.0"
- }
- },
"node_modules/color": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
@@ -7233,18 +6951,6 @@
"hyphenate-style-name": "^1.0.3"
}
},
- "node_modules/css-tree": {
- "version": "2.3.1",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "mdn-data": "2.0.30",
- "source-map-js": "^1.0.1"
- },
- "engines": {
- "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
- }
- },
"node_modules/cssesc": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
@@ -8446,14 +8152,6 @@
"url": "https://opencollective.com/unified"
}
},
- "node_modules/estree-walker": {
- "version": "3.0.3",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@types/estree": "^1.0.0"
- }
- },
"node_modules/esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
@@ -8483,12 +8181,12 @@
}
},
"node_modules/eventsource-parser": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-1.1.2.tgz",
- "integrity": "sha512-v0eOBUbiaFojBu2s2NPBfYUoRR9GjcDNvCXVaqEf5vVfpIAh9f8RCo4vXTP8c63QRKCFwoLpMpTdPwwhEKVgzA==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.0.tgz",
+ "integrity": "sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==",
"license": "MIT",
"engines": {
- "node": ">=14.18"
+ "node": ">=18.0.0"
}
},
"node_modules/expand-template": {
@@ -9837,6 +9535,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/idb-keyval": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.1.tgz",
+ "integrity": "sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==",
+ "license": "Apache-2.0"
+ },
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
@@ -10336,14 +10040,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/is-reference": {
- "version": "3.0.2",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@types/estree": "*"
- }
- },
"node_modules/is-regex": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
@@ -10860,11 +10556,6 @@
"node": ">=6.11.5"
}
},
- "node_modules/locate-character": {
- "version": "3.0.0",
- "license": "MIT",
- "peer": true
- },
"node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
@@ -10979,14 +10670,6 @@
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc"
}
},
- "node_modules/magic-string": {
- "version": "0.30.10",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@jridgewell/sourcemap-codec": "^1.4.15"
- }
- },
"node_modules/make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
@@ -11347,11 +11030,6 @@
"url": "https://opencollective.com/unified"
}
},
- "node_modules/mdn-data": {
- "version": "2.0.30",
- "license": "CC0-1.0",
- "peer": true
- },
"node_modules/merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
@@ -12277,9 +11955,9 @@
}
},
"node_modules/nanoid": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
- "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
+ "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
"funding": [
{
"type": "github",
@@ -12793,6 +12471,72 @@
"integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==",
"license": "MIT"
},
+ "node_modules/ollama-ai-provider": {
+ "version": "0.16.1",
+ "resolved": "https://registry.npmjs.org/ollama-ai-provider/-/ollama-ai-provider-0.16.1.tgz",
+ "integrity": "sha512-0vSQVz5Y/LguyzfO4bi1JrrVGF/k2JvO8/uFR0wYmqDFp8KPp4+AhdENSynGBr1oRhMWOM4F1l6cv7UNDgRMjw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "0.0.26",
+ "@ai-sdk/provider-utils": "1.0.22",
+ "partial-json": "0.1.7"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.0.0"
+ },
+ "peerDependenciesMeta": {
+ "zod": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ollama-ai-provider/node_modules/@ai-sdk/provider": {
+ "version": "0.0.26",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-0.0.26.tgz",
+ "integrity": "sha512-dQkfBDs2lTYpKM8389oopPdQgIU007GQyCbuPPrV+K6MtSII3HBfE0stUIMXUb44L+LK1t6GXPP7wjSzjO6uKg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "json-schema": "^0.4.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/ollama-ai-provider/node_modules/@ai-sdk/provider-utils": {
+ "version": "1.0.22",
+ "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-1.0.22.tgz",
+ "integrity": "sha512-YHK2rpj++wnLVc9vPGzGFP3Pjeld2MwhKinetA0zKXOoHAT/Jit5O8kZsxcSlJPu9wvcGT1UGZEjZrtO7PfFOQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@ai-sdk/provider": "0.0.26",
+ "eventsource-parser": "^1.1.2",
+ "nanoid": "^3.3.7",
+ "secure-json-parse": "^2.7.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "zod": "^3.0.0"
+ },
+ "peerDependenciesMeta": {
+ "zod": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ollama-ai-provider/node_modules/eventsource-parser": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-1.1.2.tgz",
+ "integrity": "sha512-v0eOBUbiaFojBu2s2NPBfYUoRR9GjcDNvCXVaqEf5vVfpIAh9f8RCo4vXTP8c63QRKCFwoLpMpTdPwwhEKVgzA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.18"
+ }
+ },
"node_modules/on-exit-leak-free": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz",
@@ -13090,6 +12834,12 @@
"url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
+ "node_modules/partial-json": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/partial-json/-/partial-json-0.1.7.tgz",
+ "integrity": "sha512-Njv/59hHaokb/hRUjce3Hdv12wd60MtM9Z5Olmn+nehe0QDAsRtRbJPvJ0Z91TusF0SuZRIvnM+S4l6EIP8leA==",
+ "license": "MIT"
+ },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -13150,16 +12900,6 @@
"node": ">=8"
}
},
- "node_modules/periscopic": {
- "version": "3.1.0",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@types/estree": "^1.0.0",
- "estree-walker": "^3.0.0",
- "is-reference": "^3.0.0"
- }
- },
"node_modules/pg": {
"version": "8.12.0",
"license": "MIT",
@@ -13738,7 +13478,9 @@
}
},
"node_modules/postcss": {
- "version": "8.4.39",
+ "version": "8.4.49",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
+ "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
"funding": [
{
"type": "opencollective",
@@ -13756,8 +13498,8 @@
"license": "MIT",
"dependencies": {
"nanoid": "^3.3.7",
- "picocolors": "^1.0.1",
- "source-map-js": "^1.2.0"
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
},
"engines": {
"node": "^10 || ^12 || >=14"
@@ -13888,24 +13630,6 @@
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
"license": "MIT"
},
- "node_modules/postcss/node_modules/nanoid": {
- "version": "3.3.7",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
- "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "bin": {
- "nanoid": "bin/nanoid.cjs"
- },
- "engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
- }
- },
"node_modules/postgres-array": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz",
@@ -14352,6 +14076,22 @@
"react": ">=16.13.1"
}
},
+ "node_modules/react-hook-form": {
+ "version": "7.53.2",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.53.2.tgz",
+ "integrity": "sha512-YVel6fW5sOeedd1524pltpHX+jgU2u3DSDtXEaBORNdqiNrsX/nUI/iGXONegttg0mJVnfrIkiV0cmTU6Oo2xw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/react-hook-form"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17 || ^18 || ^19"
+ }
+ },
"node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
@@ -15438,7 +15178,9 @@
}
},
"node_modules/source-map-js": {
- "version": "1.2.0",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
@@ -15516,18 +15258,6 @@
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
- "node_modules/sswr": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/sswr/-/sswr-2.1.0.tgz",
- "integrity": "sha512-Cqc355SYlTAaUt8iDPaC/4DPPXK925PePLMxyBKuWd5kKc5mwsG3nT9+Mq2tyguL5s7b4Jg+IRMpTRsNTAfpSQ==",
- "license": "MIT",
- "dependencies": {
- "swrev": "^4.0.0"
- },
- "peerDependencies": {
- "svelte": "^4.0.0 || ^5.0.0-next.0"
- }
- },
"node_modules/stack-generator": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-2.0.10.tgz",
@@ -16078,72 +15808,17 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/svelte": {
- "version": "4.2.18",
+ "node_modules/swr": {
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/swr/-/swr-2.2.5.tgz",
+ "integrity": "sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==",
"license": "MIT",
- "peer": true,
"dependencies": {
- "@ampproject/remapping": "^2.2.1",
- "@jridgewell/sourcemap-codec": "^1.4.15",
- "@jridgewell/trace-mapping": "^0.3.18",
- "@types/estree": "^1.0.1",
- "acorn": "^8.9.0",
- "aria-query": "^5.3.0",
- "axobject-query": "^4.0.0",
- "code-red": "^1.0.3",
- "css-tree": "^2.3.1",
- "estree-walker": "^3.0.3",
- "is-reference": "^3.0.1",
- "locate-character": "^3.0.0",
- "magic-string": "^0.30.4",
- "periscopic": "^3.1.0"
+ "client-only": "^0.0.1",
+ "use-sync-external-store": "^1.2.0"
},
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/svelte/node_modules/aria-query": {
- "version": "5.3.0",
- "license": "Apache-2.0",
- "peer": true,
- "dependencies": {
- "dequal": "^2.0.3"
- }
- },
- "node_modules/svelte/node_modules/axobject-query": {
- "version": "4.1.0",
- "license": "Apache-2.0",
- "peer": true,
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/swr": {
- "version": "2.2.5",
- "resolved": "https://registry.npmjs.org/swr/-/swr-2.2.5.tgz",
- "integrity": "sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==",
- "license": "MIT",
- "dependencies": {
- "client-only": "^0.0.1",
- "use-sync-external-store": "^1.2.0"
- },
- "peerDependencies": {
- "react": "^16.11.0 || ^17.0.0 || ^18.0.0"
- }
- },
- "node_modules/swrev": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/swrev/-/swrev-4.0.0.tgz",
- "integrity": "sha512-LqVcOHSB4cPGgitD1riJ1Hh4vdmITOp+BkmfmXRh4hSF/t7EnS4iD+SOTmq7w5pPm/SiPeto4ADbKS6dHUDWFA==",
- "license": "MIT"
- },
- "node_modules/swrv": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/swrv/-/swrv-1.0.4.tgz",
- "integrity": "sha512-zjEkcP8Ywmj+xOJW3lIT65ciY/4AL4e/Or7Gj0MzU3zBJNMdJiT8geVZhINavnlHRMMCcJLHhraLTAiDOTmQ9g==",
- "license": "Apache-2.0",
- "peerDependencies": {
- "vue": ">=3.2.26 < 4"
+ "peerDependencies": {
+ "react": "^16.11.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/tailwind-merge": {
@@ -16411,6 +16086,18 @@
"node": ">=10"
}
},
+ "node_modules/throttleit": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-2.1.0.tgz",
+ "integrity": "sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/tinyexec": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz",
@@ -16976,7 +16663,7 @@
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
"integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
- "devOptional": true,
+ "dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@@ -17300,26 +16987,496 @@
"url": "https://opencollective.com/unified"
}
},
- "node_modules/vue": {
- "version": "3.4.33",
+ "node_modules/vite": {
+ "version": "5.4.11",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz",
+ "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==",
+ "dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
- "@vue/compiler-dom": "3.4.33",
- "@vue/compiler-sfc": "3.4.33",
- "@vue/runtime-dom": "3.4.33",
- "@vue/server-renderer": "3.4.33",
- "@vue/shared": "3.4.33"
+ "esbuild": "^0.21.3",
+ "postcss": "^8.4.43",
+ "rollup": "^4.20.0"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^18.0.0 || >=20.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
},
"peerDependencies": {
- "typescript": "*"
+ "@types/node": "^18.0.0 || >=20.0.0",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "sass-embedded": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.4.0"
},
"peerDependenciesMeta": {
- "typescript": {
+ "@types/node": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
"optional": true
}
}
},
+ "node_modules/vite/node_modules/@esbuild/aix-ppc64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
+ "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/android-arm": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
+ "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/android-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
+ "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/android-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
+ "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/darwin-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
+ "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/darwin-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
+ "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
+ "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/freebsd-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
+ "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-arm": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
+ "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
+ "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-ia32": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
+ "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-loong64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
+ "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-mips64el": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
+ "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-ppc64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
+ "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-riscv64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
+ "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-s390x": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
+ "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/linux-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
+ "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/netbsd-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
+ "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/openbsd-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
+ "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/sunos-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
+ "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/win32-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
+ "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/win32-ia32": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
+ "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/@esbuild/win32-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
+ "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/vite/node_modules/esbuild": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
+ "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.21.5",
+ "@esbuild/android-arm": "0.21.5",
+ "@esbuild/android-arm64": "0.21.5",
+ "@esbuild/android-x64": "0.21.5",
+ "@esbuild/darwin-arm64": "0.21.5",
+ "@esbuild/darwin-x64": "0.21.5",
+ "@esbuild/freebsd-arm64": "0.21.5",
+ "@esbuild/freebsd-x64": "0.21.5",
+ "@esbuild/linux-arm": "0.21.5",
+ "@esbuild/linux-arm64": "0.21.5",
+ "@esbuild/linux-ia32": "0.21.5",
+ "@esbuild/linux-loong64": "0.21.5",
+ "@esbuild/linux-mips64el": "0.21.5",
+ "@esbuild/linux-ppc64": "0.21.5",
+ "@esbuild/linux-riscv64": "0.21.5",
+ "@esbuild/linux-s390x": "0.21.5",
+ "@esbuild/linux-x64": "0.21.5",
+ "@esbuild/netbsd-x64": "0.21.5",
+ "@esbuild/openbsd-x64": "0.21.5",
+ "@esbuild/sunos-x64": "0.21.5",
+ "@esbuild/win32-arm64": "0.21.5",
+ "@esbuild/win32-ia32": "0.21.5",
+ "@esbuild/win32-x64": "0.21.5"
+ }
+ },
"node_modules/watchpack": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz",
@@ -17782,10 +17939,12 @@
}
},
"node_modules/zod-to-json-schema": {
- "version": "3.22.5",
+ "version": "3.23.5",
+ "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.23.5.tgz",
+ "integrity": "sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==",
"license": "ISC",
"peerDependencies": {
- "zod": "^3.22.4"
+ "zod": "^3.23.3"
}
},
"node_modules/zustand": {