An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
feat: Add typecheck, format commands and CI workflow
Yoshiki Miura5660f5cbba60
diff --git a/.eslintrc.json b/.eslintrc.jsonindex bffb357a..009005f3 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -1,3 +1,36 @@{- "extends": "next/core-web-vitals"+ "extends": "next/core-web-vitals",+ "plugins": ["simple-import-sort"],+ "rules": {+ "simple-import-sort/imports": [+ "error",+ {+ "groups": [+ // React and Next.js imports+ ["^react", "^next"],+ // Third party imports+ ["^@?\\w"],+ // Internal imports+ ["^@/types"],+ ["^@/config"],+ ["^@/lib"],+ ["^@/hooks"],+ ["^@/components/ui"],+ ["^@/components"],+ ["^@/registry"],+ ["^@/styles"],+ ["^@/app"],+ // Side effect imports+ ["^\\u0000"],+ // Parent imports+ ["^\\.\\.(?!/?$)", "^\\.\\./?$"],+ // Other relative imports+ ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],+ // Style imports+ ["^.+\\.s?css$"]+ ]+ }+ ],+ "simple-import-sort/exports": "error"+ }}diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 2e1cff12..52f6222d 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -9,7 +9,7 @@ on:jobs:lint-typecheck-format:runs-on: ubuntu-latest-+steps:- name: Checkout repositoryuses: actions/checkout@v4@@ -32,4 +32,4 @@ jobs:run: bun format:check- name: Build application- run: bun build\ No newline at end of file+ run: bun builddiff --git a/.prettierignore b/.prettierignorenew file mode 100644index 00000000..e60e4f28--- /dev/null+++ b/.prettierignore@@ -0,0 +1,37 @@+# Dependencies+node_modules/+.next/+out/+build/+dist/++# Environment+.env*++# Generated files+*.lock+bun.lock+package-lock.json+yarn.lock+pnpm-lock.yaml++# IDE+.vscode/+.idea/++# Misc+*.log+.DS_Store+coverage/+.cache/++# Next.js+.next/+out/++# Production+build/++# Temporary files+tmp/+temp/\ No newline at end of filediff --git a/CLAUDE.md b/CLAUDE.mdindex 8f148900..106fcdaa 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -5,21 +5,24 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co## Key Commands### Development+- `bun dev` - Start development server with Next.js Turbo mode (http://localhost:3000)- `bun build` - Create production build- `bun start` - Start production server-- `bun lint` - Run ESLint for code quality checks+- `bun lint` - Run ESLint for code quality checks and import sorting- `bun typecheck` - Run TypeScript type checking- `bun format` - Format code with Prettier- `bun format:check` - Check code formatting without modifying files### Docker+- `docker compose up -d` - Run the application with Docker- `docker pull ghcr.io/miurla/morphic:latest` - Pull prebuilt Docker image## Architecture Overview### Tech Stack+- **Next.js 15.2.3** with App Router and React Server Components- **React 19.0.0** with TypeScript for type safety- **Vercel AI SDK 4.3.6** for AI streaming and GenerativeUI@@ -63,12 +66,14 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co## Environment Configuration### Required Variables+```bashOPENAI_API_KEY= # Default AI providerTAVILY_API_KEY= # Default search provider```### Optional Features+- Chat history: Set `NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORY=true` and configure Redis- Alternative AI providers: Add corresponding API keys (ANTHROPIC_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, etc.)- Alternative search: Configure SEARCH_API and provider-specific settings@@ -83,22 +88,30 @@ TAVILY_API_KEY= # Default search provider5. **Error Handling**: Comprehensive error boundaries and fallback UI components## Testing Approach+Currently no dedicated test framework. Verify changes by:+1. Running `bun lint` to check code quality2. Building with `bun build` to catch TypeScript errors3. Manual testing in development mode## Pre-PR Requirements+Before creating a pull request, you MUST ensure all of the following checks pass:-1. **Linting**: Run `bun lint` and fix all ESLint errors and warnings++1. **Linting**: Run `bun lint` and fix all ESLint errors and warnings (includes import sorting)2. **Type checking**: Run `bun typecheck` to ensure no TypeScript errors3. **Formatting**: Run `bun format:check` to verify code formatting (or `bun format` to auto-fix)4. **Build**: Run `bun build` to ensure the application builds successfullyThese checks are enforced in CI/CD and PRs will fail if any of these steps don't pass.+Note: Import sorting is handled by ESLint using `eslint-plugin-simple-import-sort`. Run `bun lint --fix` to automatically sort imports according to the configured order.+## Model Configuration+Models are defined in `public/config/models.json` with:+- `id`: Model identifier- `provider`: Display name- `providerId`: Provider key for API routing@@ -107,8 +120,10 @@ Models are defined in `public/config/models.json` with:- `toolCallModel`: Optional override for tool calls## Database Policies+When working with Supabase, follow the cursor rules in `.cursor/rules/` for:+- Creating migrations- Setting up RLS policies- Writing edge functions-- SQL style guide\ No newline at end of file+- SQL style guidediff --git a/app/api/advanced-search/route.ts b/app/api/advanced-search/route.tsindex afa5b89e..a53addd5 100644--- a/app/api/advanced-search/route.ts+++ b/app/api/advanced-search/route.ts@@ -1,16 +1,18 @@import { NextResponse } from 'next/server'++import { Redis } from '@upstash/redis'import http from 'http'+import { Agent } from 'http'import https from 'https'import { JSDOM, VirtualConsole } from 'jsdom'+import { createClient } from 'redis'+import {- SearXNGSearchResults,+ SearchResultItem,SearXNGResponse,SearXNGResult,- SearchResultItem+ SearXNGSearchResults} from '@/lib/types'-import { Agent } from 'http'-import { Redis } from '@upstash/redis'-import { createClient } from 'redis'/*** Maximum number of results to fetch from SearXNG.diff --git a/app/api/chat/[id]/route.ts b/app/api/chat/[id]/route.tsindex 32757fb7..590461d3 100644--- a/app/api/chat/[id]/route.ts+++ b/app/api/chat/[id]/route.ts@@ -1,6 +1,7 @@+import { NextRequest, NextResponse } from 'next/server'+import { deleteChat } from '@/lib/actions/chat'import { getCurrentUserId } from '@/lib/auth/get-current-user'-import { NextRequest, NextResponse } from 'next/server'export async function DELETE(request: NextRequest,diff --git a/app/api/chat/route.ts b/app/api/chat/route.tsindex 906379e3..9cf18d4f 100644--- a/app/api/chat/route.ts+++ b/app/api/chat/route.ts@@ -1,9 +1,10 @@+import { cookies } from 'next/headers'+import { getCurrentUserId } from '@/lib/auth/get-current-user'import { createManualToolStreamResponse } from '@/lib/streaming/create-manual-tool-stream'import { createToolCallingStreamResponse } from '@/lib/streaming/create-tool-calling-stream'import { Model } from '@/lib/types/models'import { isProviderEnabled } from '@/lib/utils/registry'-import { cookies } from 'next/headers'export const maxDuration = 30diff --git a/app/api/chats/route.ts b/app/api/chats/route.tsindex ad22a528..9b1fd36d 100644--- a/app/api/chats/route.ts+++ b/app/api/chats/route.ts@@ -1,7 +1,8 @@+import { NextRequest, NextResponse } from 'next/server'+import { getChatsPage } from '@/lib/actions/chat'import { getCurrentUserId } from '@/lib/auth/get-current-user'import { type Chat } from '@/lib/types'-import { NextRequest, NextResponse } from 'next/server'interface ChatPageResponse {chats: Chat[]diff --git a/app/auth/confirm/route.ts b/app/auth/confirm/route.tsindex 3161cf0a..77f4f59c 100644--- a/app/auth/confirm/route.ts+++ b/app/auth/confirm/route.ts@@ -1,8 +1,10 @@-import { createClient } from '@/lib/supabase/server'-import { type EmailOtpType } from '@supabase/supabase-js'import { redirect } from 'next/navigation'import { type NextRequest } from 'next/server'+import { type EmailOtpType } from '@supabase/supabase-js'++import { createClient } from '@/lib/supabase/server'+export async function GET(request: NextRequest) {const { searchParams } = new URL(request.url)const token_hash = searchParams.get('token_hash')@@ -14,7 +16,7 @@ export async function GET(request: NextRequest) {const { error } = await supabase.auth.verifyOtp({type,- token_hash,+ token_hash})if (!error) {// redirect user to specified redirect URL or root of appdiff --git a/app/auth/error/page.tsx b/app/auth/error/page.tsxindex b7937219..013cd249 100644--- a/app/auth/error/page.tsx+++ b/app/auth/error/page.tsx@@ -1,6 +1,10 @@import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'-export default async function Page({ searchParams }: { searchParams: Promise<{ error: string }> }) {+export default async function Page({+ searchParams+}: {+ searchParams: Promise<{ error: string }>+}) {const params = await searchParamsreturn (@@ -9,13 +13,19 @@ export default async function Page({ searchParams }: { searchParams: Promise<{ e<div className="flex flex-col gap-6"><Card><CardHeader>- <CardTitle className="text-2xl">Sorry, something went wrong.</CardTitle>+ <CardTitle className="text-2xl">+ Sorry, something went wrong.+ </CardTitle></CardHeader><CardContent>{params?.error ? (- <p className="text-sm text-muted-foreground">Code error: {params.error}</p>+ <p className="text-sm text-muted-foreground">+ Code error: {params.error}+ </p>) : (- <p className="text-sm text-muted-foreground">An unspecified error occurred.</p>+ <p className="text-sm text-muted-foreground">+ An unspecified error occurred.+ </p>)}</CardContent></Card>diff --git a/app/auth/oauth/route.ts b/app/auth/oauth/route.tsindex f4401746..f46745eb 100644--- a/app/auth/oauth/route.ts+++ b/app/auth/oauth/route.ts@@ -1,4 +1,5 @@import { NextResponse } from 'next/server'+// The client you created from the Server-Side Auth instructionsimport { createClient } from '@/lib/supabase/server'diff --git a/app/auth/sign-up-success/page.tsx b/app/auth/sign-up-success/page.tsxindex f2672f6d..d139139b 100644--- a/app/auth/sign-up-success/page.tsx+++ b/app/auth/sign-up-success/page.tsx@@ -3,7 +3,7 @@ import {CardContent,CardDescription,CardHeader,- CardTitle,+ CardTitle} from '@/components/ui/card'export default function Page() {@@ -13,13 +13,15 @@ export default function Page() {<div className="flex flex-col gap-6"><Card><CardHeader>- <CardTitle className="text-2xl">Thank you for signing up!</CardTitle>+ <CardTitle className="text-2xl">+ Thank you for signing up!+ </CardTitle><CardDescription>Check your email to confirm</CardDescription></CardHeader><CardContent><p className="text-sm text-muted-foreground">- You've successfully signed up. Please check your email to confirm your account- before signing in.+ You've successfully signed up. Please check your email to+ confirm your account before signing in.</p></CardContent></Card>diff --git a/app/layout.tsx b/app/layout.tsxindex d9820e9d..1a23b011 100644--- a/app/layout.tsx+++ b/app/layout.tsx@@ -1,14 +1,19 @@+import type { Metadata, Viewport } from 'next'+import { Inter as FontSans } from 'next/font/google'++import { Analytics } from '@vercel/analytics/next'++import { createClient } from '@/lib/supabase/server'+import { cn } from '@/lib/utils'++import { SidebarProvider } from '@/components/ui/sidebar'+import { Toaster } from '@/components/ui/sonner'+import AppSidebar from '@/components/app-sidebar'import ArtifactRoot from '@/components/artifact/artifact-root'import Header from '@/components/header'import { ThemeProvider } from '@/components/theme-provider'-import { SidebarProvider } from '@/components/ui/sidebar'-import { Toaster } from '@/components/ui/sonner'-import { createClient } from '@/lib/supabase/server'-import { cn } from '@/lib/utils'-import { Analytics } from '@vercel/analytics/next'-import type { Metadata, Viewport } from 'next'-import { Inter as FontSans } from 'next/font/google'+import './globals.css'const fontSans = FontSans({diff --git a/app/page.tsx b/app/page.tsxindex bd5844a8..1bbbce48 100644--- a/app/page.tsx+++ b/app/page.tsx@@ -1,7 +1,9 @@-import { Chat } from '@/components/chat'-import { getModels } from '@/lib/config/models'import { generateId } from 'ai'+import { getModels } from '@/lib/config/models'++import { Chat } from '@/components/chat'+export default async function Page() {const id = generateId()const models = await getModels()diff --git a/app/search/[id]/page.tsx b/app/search/[id]/page.tsxindex 2a663a90..b693348a 100644--- a/app/search/[id]/page.tsx+++ b/app/search/[id]/page.tsx@@ -1,53 +1,58 @@-import { Chat } from '@/components/chat'+import { notFound, redirect } from 'next/navigation'+import { getChat } from '@/lib/actions/chat'import { getCurrentUserId } from '@/lib/auth/get-current-user'import { getModels } from '@/lib/config/models'+import { ExtendedCoreMessage, SearchResults } from '@/lib/types' // Added SearchResultsimport { convertToUIMessages } from '@/lib/utils'-import { notFound, redirect } from 'next/navigation'-import { ExtendedCoreMessage, SearchResults } from '@/lib/types'; // Added SearchResults++import { Chat } from '@/components/chat'export const maxDuration = 60export async function generateMetadata(props: {- params: Promise<{ id: string }>;+ params: Promise<{ id: string }>}) {- const { id } = await props.params;- const userId = await getCurrentUserId();- const chat = await getChat(id, userId || 'anonymous'); // Ensure fallback for userId+ const { id } = await props.params+ const userId = await getCurrentUserId()+ const chat = await getChat(id, userId || 'anonymous') // Ensure fallback for userId- let metadata: { title: string; openGraph?: { images?: { url: string; width?: number; height?: number }[] } } = {- title: chat?.title?.toString().slice(0, 50) || 'Search',- };+ let metadata: {+ title: string+ openGraph?: { images?: { url: string; width?: number; height?: number }[] }+ } = {+ title: chat?.title?.toString().slice(0, 50) || 'Search'+ }if (chat && chat.messages) {const dataMessage = chat.messages.find((msg: ExtendedCoreMessage) => msg.role === 'data'- );+ )if (dataMessage && dataMessage.content) {// Assuming dataMessage.content is of type SearchResults or a compatible structure- const searchData = dataMessage.content as SearchResults;+ const searchData = dataMessage.content as SearchResultsif (searchData.images && searchData.images.length > 0) {- const firstImage = searchData.images[0];- let imageUrl: string | undefined = undefined;+ const firstImage = searchData.images[0]+ let imageUrl: string | undefined = undefinedif (typeof firstImage === 'string') {- imageUrl = firstImage;+ imageUrl = firstImage} else if (typeof firstImage === 'object' && firstImage.url) {- imageUrl = firstImage.url;+ imageUrl = firstImage.url}if (imageUrl) {metadata.openGraph = {- images: [{ url: imageUrl, width: 1200, height: 630 }], // Standard OG image dimensions- };+ images: [{ url: imageUrl, width: 1200, height: 630 }] // Standard OG image dimensions+ }}}}}// If no image is found, metadata.openGraph.images will remain undefined,// allowing fallback to parent or global OG image settings.- return metadata;+ return metadata}// ... rest of the file (default export SearchPage) remains the samediff --git a/app/search/page.tsx b/app/search/page.tsxindex b1533fe4..b89dc409 100644--- a/app/search/page.tsx+++ b/app/search/page.tsx@@ -1,8 +1,11 @@-import { Chat } from '@/components/chat'-import { getModels } from '@/lib/config/models'-import { generateId } from 'ai'import { redirect } from 'next/navigation'+import { generateId } from 'ai'++import { getModels } from '@/lib/config/models'++import { Chat } from '@/components/chat'+export const maxDuration = 60export default async function SearchPage(props: {diff --git a/app/share/[id]/page.tsx b/app/share/[id]/page.tsxindex d9fbc624..896cd1b5 100644--- a/app/share/[id]/page.tsx+++ b/app/share/[id]/page.tsx@@ -1,8 +1,10 @@-import { Chat } from '@/components/chat'+import { notFound } from 'next/navigation'+import { getSharedChat } from '@/lib/actions/chat'import { getModels } from '@/lib/config/models'import { convertToUIMessages } from '@/lib/utils'-import { notFound } from 'next/navigation'++import { Chat } from '@/components/chat'export async function generateMetadata(props: {params: Promise<{ id: string }>diff --git a/bun.lock b/bun.lockindex 21bcea7b..ac7565c3 100644--- a/bun.lock+++ b/bun.lock@@ -74,6 +74,7 @@"@types/react-syntax-highlighter": "^15.5.13","eslint": "^8","eslint-config-next": "^14.2.25",+ "eslint-plugin-simple-import-sort": "^12.1.1","postcss": "^8","prettier": "^3.6.2","tailwindcss": "^3.4.1",@@ -694,6 +695,8 @@"eslint-plugin-react-hooks": ["[email protected]", "", { "peerDependencies": { "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" } }, "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ=="],+ "eslint-plugin-simple-import-sort": ["[email protected]", "", { "peerDependencies": { "eslint": ">=5.0.0" } }, "sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA=="],+"eslint-scope": ["[email protected]", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg=="],"eslint-visitor-keys": ["[email protected]", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],diff --git a/components.json b/components.jsonindex d9ef0ae5..13f24bf4 100644--- a/components.json+++ b/components.json@@ -18,4 +18,4 @@"hooks": "@/hooks"},"iconLibrary": "lucide"-}\ No newline at end of file+}diff --git a/components/answer-section.tsx b/components/answer-section.tsxindex 9b90ae97..81e3c1a7 100644--- a/components/answer-section.tsx+++ b/components/answer-section.tsx@@ -1,6 +1,7 @@'use client'import { ChatRequestOptions } from 'ai'+import { CollapsibleMessage } from './collapsible-message'import { DefaultSkeleton } from './default-skeleton'import { BotMessage } from './message'diff --git a/components/app-sidebar.tsx b/components/app-sidebar.tsxindex bc667ca1..7b50f4eb 100644--- a/components/app-sidebar.tsx+++ b/components/app-sidebar.tsx@@ -1,3 +1,10 @@+import { Suspense } from 'react'+import Link from 'next/link'++import { Plus } from 'lucide-react'++import { cn } from '@/lib/utils'+import {Sidebar,SidebarContent,@@ -8,10 +15,7 @@ import {SidebarRail,SidebarTrigger} from '@/components/ui/sidebar'-import { cn } from '@/lib/utils'-import { Plus } from 'lucide-react'-import Link from 'next/link'-import { Suspense } from 'react'+import { ChatHistorySection } from './sidebar/chat-history-section'import { ChatHistorySkeleton } from './sidebar/chat-history-skeleton'import { IconLogo } from './ui/icons'diff --git a/components/artifact/artifact-content.tsx b/components/artifact/artifact-content.tsxindex ad912e20..4adb0738 100644--- a/components/artifact/artifact-content.tsx+++ b/components/artifact/artifact-content.tsx@@ -1,6 +1,7 @@'use client'import { Part } from '@/components/artifact/artifact-context'+import { ReasoningContent } from './reasoning-content'import { ToolInvocationContent } from './tool-invocation-content'diff --git a/components/artifact/artifact-context.tsx b/components/artifact/artifact-context.tsxindex d24b1d9b..1d2b7ff2 100644--- a/components/artifact/artifact-context.tsx+++ b/components/artifact/artifact-context.tsx@@ -1,6 +1,5 @@'use client'-import type { ToolInvocation } from 'ai'import {createContext,ReactNode,@@ -9,6 +8,9 @@ import {useEffect,useReducer} from 'react'++import type { ToolInvocation } from 'ai'+import { useSidebar } from '../ui/sidebar'// Part types as seen in render-message.tsxdiff --git a/components/artifact/artifact-root.tsx b/components/artifact/artifact-root.tsxindex b79464c9..4d2ad77d 100644--- a/components/artifact/artifact-root.tsx+++ b/components/artifact/artifact-root.tsx@@ -1,6 +1,7 @@'use client'import { ReactNode } from 'react'+import { ArtifactProvider } from './artifact-context'import { ChatArtifactContainer } from './chat-artifact-container'diff --git a/components/artifact/chat-artifact-container.tsx b/components/artifact/chat-artifact-container.tsxindex f5811648..5b8b19da 100644--- a/components/artifact/chat-artifact-container.tsx+++ b/components/artifact/chat-artifact-container.tsx@@ -1,16 +1,20 @@'use client'-import { InspectorDrawer } from '@/components/inspector/inspector-drawer'-import { InspectorPanel } from '@/components/inspector/inspector-panel'+import React, { useEffect, useState } from 'react'++import { useMediaQuery } from '@/lib/hooks/use-media-query'+import { cn } from '@/lib/utils'+import {ResizableHandle,ResizablePanel,ResizablePanelGroup} from '@/components/ui/resizable'import { SidebarTrigger, useSidebar } from '@/components/ui/sidebar'-import { useMediaQuery } from '@/lib/hooks/use-media-query'-import { cn } from '@/lib/utils'-import React, { useEffect, useState } from 'react'++import { InspectorDrawer } from '@/components/inspector/inspector-drawer'+import { InspectorPanel } from '@/components/inspector/inspector-panel'+import { useArtifact } from './artifact-context'export function ChatArtifactContainer({childrendiff --git a/components/artifact/reasoning-content.tsx b/components/artifact/reasoning-content.tsxindex f2f4fe56..ecfed9d7 100644--- a/components/artifact/reasoning-content.tsx+++ b/components/artifact/reasoning-content.tsx@@ -1,7 +1,9 @@'use client'-import { cn } from '@/lib/utils'import remarkGfm from 'remark-gfm'++import { cn } from '@/lib/utils'+import { MemoizedReactMarkdown } from '../ui/markdown'export function ReasoningContent({ reasoning }: { reasoning: string }) {diff --git a/components/artifact/retrieve-artifact-content.tsx b/components/artifact/retrieve-artifact-content.tsxindex 856efdc3..3fe2dfdb 100644--- a/components/artifact/retrieve-artifact-content.tsx+++ b/components/artifact/retrieve-artifact-content.tsx@@ -1,12 +1,15 @@'use client'-import { SearchResults } from '@/components/search-results'-import { Section, ToolArgsSection } from '@/components/section'+import type { ToolInvocation } from 'ai'+import type {SearchResultItem,SearchResults as TypeSearchResults} from '@/lib/types/index'-import type { ToolInvocation } from 'ai'++import { SearchResults } from '@/components/search-results'+import { Section, ToolArgsSection } from '@/components/section'+import { MemoizedReactMarkdown } from '../ui/markdown'const MAX_CONTENT_LENGTH = 1000diff --git a/components/artifact/search-artifact-content.tsx b/components/artifact/search-artifact-content.tsxindex 39429096..d1ee1e70 100644--- a/components/artifact/search-artifact-content.tsx+++ b/components/artifact/search-artifact-content.tsx@@ -1,10 +1,12 @@'use client'+import type { ToolInvocation } from 'ai'++import type { SearchResults as TypeSearchResults } from '@/lib/types'+import { SearchResults } from '@/components/search-results'import { SearchResultsImageSection } from '@/components/search-results-image'import { Section, ToolArgsSection } from '@/components/section'-import type { SearchResults as TypeSearchResults } from '@/lib/types'-import type { ToolInvocation } from 'ai'export function SearchArtifactContent({ tool }: { tool: ToolInvocation }) {const searchResults: TypeSearchResults =diff --git a/components/artifact/tool-invocation-content.tsx b/components/artifact/tool-invocation-content.tsxindex 25d1550c..f4f52b36 100644--- a/components/artifact/tool-invocation-content.tsx+++ b/components/artifact/tool-invocation-content.tsx@@ -1,9 +1,10 @@'use client'+import type { ToolInvocation } from 'ai'+import { RetrieveArtifactContent } from '@/components/artifact/retrieve-artifact-content'import { SearchArtifactContent } from '@/components/artifact/search-artifact-content'import { VideoSearchArtifactContent } from '@/components/artifact/video-search-artifact-content'-import type { ToolInvocation } from 'ai'export function ToolInvocationContent({toolInvocationdiff --git a/components/artifact/video-search-artifact-content.tsx b/components/artifact/video-search-artifact-content.tsxindex 7889597a..a82beab4 100644--- a/components/artifact/video-search-artifact-content.tsx+++ b/components/artifact/video-search-artifact-content.tsx@@ -1,12 +1,14 @@'use client'-import { ToolArgsSection } from '@/components/section'-import { VideoResultGrid } from '@/components/video-result-grid'+import type { ToolInvocation } from 'ai'+import {type SerperSearchResultItem,type SerperSearchResults} from '@/lib/types'-import type { ToolInvocation } from 'ai'++import { ToolArgsSection } from '@/components/section'+import { VideoResultGrid } from '@/components/video-result-grid'export function VideoSearchArtifactContent({ tool }: { tool: ToolInvocation }) {const videoResults: SerperSearchResults | undefined =diff --git a/components/chat-messages.tsx b/components/chat-messages.tsxindex dd6c2719..24830e1e 100644--- a/components/chat-messages.tsx+++ b/components/chat-messages.tsx@@ -1,11 +1,14 @@'use client'-import { cn } from '@/lib/utils'-import { ChatRequestOptions, JSONValue, Message } from 'ai'import { useEffect, useMemo, useState } from 'react'++import { ChatRequestOptions, JSONValue, Message } from 'ai'++import { cn } from '@/lib/utils'++import { Spinner } from './ui/spinner'import { RenderMessage } from './render-message'import { ToolSection } from './tool-section'-import { Spinner } from './ui/spinner'// Import section structure interfaceinterface ChatSection {diff --git a/components/chat-panel.tsx b/components/chat-panel.tsxindex 57d4c040..9fd7184a 100644--- a/components/chat-panel.tsx+++ b/components/chat-panel.tsx@@ -1,18 +1,21 @@'use client'-import { Model } from '@/lib/types/models'-import { cn } from '@/lib/utils'-import { Message } from 'ai'-import { ArrowUp, ChevronDown, MessageCirclePlus, Square } from 'lucide-react'-import { useRouter } from 'next/navigation'import { useEffect, useRef, useState } from 'react'import Textarea from 'react-textarea-autosize'+import { useRouter } from 'next/navigation'++import { Message } from 'ai'+import { ArrowUp, ChevronDown, MessageCirclePlus, Square } from 'lucide-react'++import { Model } from '@/lib/types/models'+import { cn } from '@/lib/utils'+import { useArtifact } from './artifact/artifact-context'+import { Button } from './ui/button'+import { IconLogo } from './ui/icons'import { EmptyScreen } from './empty-screen'import { ModelSelector } from './model-selector'import { SearchModeToggle } from './search-mode-toggle'-import { Button } from './ui/button'-import { IconLogo } from './ui/icons'interface ChatPanelProps {input: stringdiff --git a/components/chat-share.tsx b/components/chat-share.tsxindex 104f1520..ce07f9dc 100644--- a/components/chat-share.tsx+++ b/components/chat-share.tsx@@ -1,11 +1,14 @@'use client'+import { useState, useTransition } from 'react'++import { Share } from 'lucide-react'+import { toast } from 'sonner'+import { shareChat } from '@/lib/actions/chat'import { useCopyToClipboard } from '@/lib/hooks/use-copy-to-clipboard'import { cn } from '@/lib/utils'-import { Share } from 'lucide-react'-import { useState, useTransition } from 'react'-import { toast } from 'sonner'+import { Button } from './ui/button'import {Dialog,diff --git a/components/chat.tsx b/components/chat.tsxindex 425efe47..82197d8e 100644--- a/components/chat.tsx+++ b/components/chat.tsx@@ -1,13 +1,16 @@'use client'-import { CHAT_ID } from '@/lib/constants'-import { Model } from '@/lib/types/models'-import { cn } from '@/lib/utils'+import { useEffect, useMemo, useRef, useState } from 'react'+import { useChat } from '@ai-sdk/react'import { ChatRequestOptions } from 'ai'import { Message } from 'ai/react'-import { useEffect, useMemo, useRef, useState } from 'react'import { toast } from 'sonner'++import { CHAT_ID } from '@/lib/constants'+import { Model } from '@/lib/types/models'+import { cn } from '@/lib/utils'+import { ChatMessages } from './chat-messages'import { ChatPanel } from './chat-panel'diff --git a/components/clear-history.tsx b/components/clear-history.tsxindex 19a4c605..5e492c74 100644--- a/components/clear-history.tsx+++ b/components/clear-history.tsx@@ -1,5 +1,11 @@'use client'+import { useState, useTransition } from 'react'++import { toast } from 'sonner'++import { clearChats } from '@/lib/actions/chat'+import {AlertDialog,AlertDialogAction,@@ -12,9 +18,7 @@ import {AlertDialogTrigger} from '@/components/ui/alert-dialog'import { Button } from '@/components/ui/button'-import { clearChats } from '@/lib/actions/chat'-import { useState, useTransition } from 'react'-import { toast } from 'sonner'+import { Spinner } from './ui/spinner'type ClearHistoryProps = {diff --git a/components/collapsible-message.tsx b/components/collapsible-message.tsxindex f2f71742..ced06c7b 100644--- a/components/collapsible-message.tsx+++ b/components/collapsible-message.tsx@@ -1,6 +1,7 @@-import { cn } from '@/lib/utils'import { ChevronDown } from 'lucide-react'-import { CurrentUserAvatar } from './current-user-avatar'++import { cn } from '@/lib/utils'+import {Collapsible,CollapsibleContent,@@ -8,6 +9,7 @@ import {} from './ui/collapsible'import { IconLogo } from './ui/icons'import { Separator } from './ui/separator'+import { CurrentUserAvatar } from './current-user-avatar'interface CollapsibleMessageProps {children: React.ReactNodediff --git a/components/current-user-avatar.tsx b/components/current-user-avatar.tsxindex 95715b2e..08f3d878 100644--- a/components/current-user-avatar.tsx+++ b/components/current-user-avatar.tsx@@ -1,9 +1,11 @@'use client'-import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'+import { User2 } from 'lucide-react'+import { useCurrentUserImage } from '@/hooks/use-current-user-image'import { useCurrentUserName } from '@/hooks/use-current-user-name'-import { User2 } from 'lucide-react'++import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'export const CurrentUserAvatar = () => {const profileImage = useCurrentUserImage()diff --git a/components/custom-link.tsx b/components/custom-link.tsxindex 51311036..16d971c3 100644--- a/components/custom-link.tsx+++ b/components/custom-link.tsx@@ -1,6 +1,7 @@-import { cn } from '@/lib/utils'import { AnchorHTMLAttributes, DetailedHTMLProps, ReactNode } from 'react'+import { cn } from '@/lib/utils'+type CustomLinkProps = Omit<DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>,'ref'diff --git a/components/empty-screen.tsx b/components/empty-screen.tsxindex 84911417..45704089 100644--- a/components/empty-screen.tsx+++ b/components/empty-screen.tsx@@ -1,6 +1,7 @@-import { Button } from '@/components/ui/button'import { ArrowRight } from 'lucide-react'+import { Button } from '@/components/ui/button'+const exampleMessages = [{heading: 'What is DeepSeek R1?',diff --git a/components/external-link-items.tsx b/components/external-link-items.tsxindex 66481db5..f4e26838 100644--- a/components/external-link-items.tsx+++ b/components/external-link-items.tsx@@ -1,8 +1,9 @@'use client'-import { DropdownMenuItem } from '@/components/ui/dropdown-menu'-import Link from 'next/link'import { SiDiscord, SiGithub, SiX } from 'react-icons/si'+import Link from 'next/link'++import { DropdownMenuItem } from '@/components/ui/dropdown-menu'const externalLinks = [{diff --git a/components/forgot-password-form.tsx b/components/forgot-password-form.tsxindex cd256b7b..ed62f825 100644--- a/components/forgot-password-form.tsx+++ b/components/forgot-password-form.tsx@@ -1,21 +1,26 @@'use client'-import { cn } from '@/lib/utils/index'+import { useState } from 'react'+import Link from 'next/link'+import { createClient } from '@/lib/supabase/client'+import { cn } from '@/lib/utils/index'+import { Button } from '@/components/ui/button'import {Card,CardContent,CardDescription,CardHeader,- CardTitle,+ CardTitle} from '@/components/ui/card'import { Input } from '@/components/ui/input'import { Label } from '@/components/ui/label'-import Link from 'next/link'-import { useState } from 'react'-export function ForgotPasswordForm({ className, ...props }: React.ComponentPropsWithoutRef<'div'>) {+export function ForgotPasswordForm({+ className,+ ...props+}: React.ComponentPropsWithoutRef<'div'>) {const [email, setEmail] = useState('')const [error, setError] = useState<string | null>(null)const [success, setSuccess] = useState(false)@@ -30,7 +35,7 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentPropstry {// The url which will be included in the email. This URL needs to be configured in your redirect URLs in the Supabase dashboard at https://supabase.com/dashboard/project/_/auth/url-configurationconst { error } = await supabase.auth.resetPasswordForEmail(email, {- redirectTo: `${window.location.origin}/auth/update-password`,+ redirectTo: `${window.location.origin}/auth/update-password`})if (error) throw errorsetSuccess(true)@@ -51,8 +56,8 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentProps</CardHeader><CardContent><p className="text-sm text-muted-foreground">- If you registered using your email and password, you will receive a password reset- email.+ If you registered using your email and password, you will receive+ a password reset email.</p></CardContent></Card>@@ -61,7 +66,8 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentProps<CardHeader><CardTitle className="text-2xl">Reset Your Password</CardTitle><CardDescription>- Type in your email and we'll send you a link to reset your password+ Type in your email and we'll send you a link to reset your+ password</CardDescription></CardHeader><CardContent>@@ -75,7 +81,7 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentPropsplaceholder="[email protected]"requiredvalue={email}- onChange={(e) => setEmail(e.target.value)}+ onChange={e => setEmail(e.target.value)}/></div>{error && <p className="text-sm text-red-500">{error}</p>}@@ -85,7 +91,10 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentProps</div><div className="mt-4 text-center text-sm">Already have an account?{' '}- <Link href="/auth/login" className="underline underline-offset-4">+ <Link+ href="/auth/login"+ className="underline underline-offset-4"+ >Login</Link></div>diff --git a/components/guest-menu.tsx b/components/guest-menu.tsxindex 714201ef..23787358 100644--- a/components/guest-menu.tsx+++ b/components/guest-menu.tsx@@ -1,5 +1,14 @@'use client'+import Link from 'next/link'++import {+ Link2,+ LogIn,+ Palette,+ Settings2 // Or EllipsisVertical, etc.+} from 'lucide-react'+import { Button } from '@/components/ui/button'import {DropdownMenu,@@ -11,13 +20,7 @@ import {DropdownMenuSubTrigger,DropdownMenuTrigger} from '@/components/ui/dropdown-menu'-import {- Link2,- LogIn,- Palette,- Settings2 // Or EllipsisVertical, etc.-} from 'lucide-react'-import Link from 'next/link'+import { ExternalLinkItems } from './external-link-items'import { ThemeMenuItems } from './theme-menu-items'diff --git a/components/header.tsx b/components/header.tsxindex b4beb6e7..f1c4cfd8 100644--- a/components/header.tsx+++ b/components/header.tsx@@ -1,10 +1,14 @@'use client'-import { useSidebar } from '@/components/ui/sidebar'-import { cn } from '@/lib/utils'-import { User } from '@supabase/supabase-js'// import Link from 'next/link' // No longer needed directly here for Sign In buttonimport React from 'react'++import { User } from '@supabase/supabase-js'++import { cn } from '@/lib/utils'++import { useSidebar } from '@/components/ui/sidebar'+// import { Button } from './ui/button' // No longer needed directly here for Sign In buttonimport GuestMenu from './guest-menu' // Import the new GuestMenu componentimport UserMenu from './user-menu'diff --git a/components/inspector/inspector-drawer.tsx b/components/inspector/inspector-drawer.tsxindex 0834506f..5ae15099 100644--- a/components/inspector/inspector-drawer.tsx+++ b/components/inspector/inspector-drawer.tsx@@ -1,9 +1,13 @@'use client'-import { useArtifact } from '@/components/artifact/artifact-context'-import { Drawer, DrawerContent, DrawerTitle } from '@/components/ui/drawer'-import { useMediaQuery } from '@/lib/hooks/use-media-query'import { VisuallyHidden } from '@radix-ui/react-visually-hidden'++import { useMediaQuery } from '@/lib/hooks/use-media-query'++import { Drawer, DrawerContent, DrawerTitle } from '@/components/ui/drawer'++import { useArtifact } from '@/components/artifact/artifact-context'+import { InspectorPanel } from './inspector-panel'export function InspectorDrawer() {diff --git a/components/inspector/inspector-panel.tsx b/components/inspector/inspector-panel.tsxindex 841d903e..9dd860d8 100644--- a/components/inspector/inspector-panel.tsx+++ b/components/inspector/inspector-panel.tsx@@ -1,17 +1,19 @@'use client'-import { ArtifactContent } from '@/components/artifact/artifact-content'-import { useArtifact } from '@/components/artifact/artifact-context'+import { LightbulbIcon, MessageSquare, Minimize2, Wrench } from 'lucide-react'+import { Button } from '@/components/ui/button'import { Separator } from '@/components/ui/separator'-import { TooltipButton } from '@/components/ui/tooltip-button'import {Tooltip,TooltipContent,TooltipProvider,TooltipTrigger} from '@/components/ui/tooltip'-import { LightbulbIcon, MessageSquare, Minimize2, Wrench } from 'lucide-react'+import { TooltipButton } from '@/components/ui/tooltip-button'++import { ArtifactContent } from '@/components/artifact/artifact-content'+import { useArtifact } from '@/components/artifact/artifact-context'export function InspectorPanel() {const { state, close } = useArtifact()diff --git a/components/login-form.tsx b/components/login-form.tsxindex 089154ac..8c592cf5 100644--- a/components/login-form.tsx+++ b/components/login-form.tsx@@ -1,5 +1,12 @@'use client'+import { useState } from 'react'+import Link from 'next/link'+import { useRouter } from 'next/navigation'++import { createClient } from '@/lib/supabase/client'+import { cn } from '@/lib/utils/index'+import { Button } from '@/components/ui/button'import {Card,@@ -11,11 +18,6 @@ import {import { IconLogo } from '@/components/ui/icons'import { Input } from '@/components/ui/input'import { Label } from '@/components/ui/label'-import { createClient } from '@/lib/supabase/client'-import { cn } from '@/lib/utils/index'-import Link from 'next/link'-import { useRouter } from 'next/navigation'-import { useState } from 'react'export function LoginForm({className,diff --git a/components/message-actions.tsx b/components/message-actions.tsxindex 094d309e..6b32a2fe 100644--- a/components/message-actions.tsx+++ b/components/message-actions.tsx@@ -1,13 +1,15 @@'use client'-import { CHAT_ID } from '@/lib/constants'-import { cn } from '@/lib/utils'import { useChat } from '@ai-sdk/react'import { Copy } from 'lucide-react'import { toast } from 'sonner'++import { CHAT_ID } from '@/lib/constants'+import { cn } from '@/lib/utils'++import { Button } from './ui/button'import { ChatShare } from './chat-share'import { RetryButton } from './retry-button'-import { Button } from './ui/button'interface MessageActionsProps {message: stringdiff --git a/components/message.tsx b/components/message.tsxindex d52a4990..08165b03 100644--- a/components/message.tsx+++ b/components/message.tsx@@ -1,14 +1,17 @@'use client'-import { cn } from '@/lib/utils'-import 'katex/dist/katex.min.css'import rehypeExternalLinks from 'rehype-external-links'import rehypeKatex from 'rehype-katex'import remarkGfm from 'remark-gfm'import remarkMath from 'remark-math'-import { Citing } from './custom-link'++import { cn } from '@/lib/utils'+import { CodeBlock } from './ui/codeblock'import { MemoizedReactMarkdown } from './ui/markdown'+import { Citing } from './custom-link'++import 'katex/dist/katex.min.css'export function BotMessage({message,diff --git a/components/model-selector.tsx b/components/model-selector.tsxindex c756b3df..f3b8b6eb 100644--- a/components/model-selector.tsx+++ b/components/model-selector.tsx@@ -1,12 +1,16 @@'use client'+import { useEffect, useState } from 'react'+import Image from 'next/image'++import { Check, ChevronsUpDown, Lightbulb } from 'lucide-react'+import { Model } from '@/lib/types/models'import { getCookie, setCookie } from '@/lib/utils/cookies'import { isReasoningModel } from '@/lib/utils/registry'-import { Check, ChevronsUpDown, Lightbulb } from 'lucide-react'-import Image from 'next/image'-import { useEffect, useState } from 'react'+import { createModelId } from '../lib/utils'+import { Button } from './ui/button'import {Command,@@ -21,14 +25,17 @@ import { Popover, PopoverContent, PopoverTrigger } from './ui/popover'function groupModelsByProvider(models: Model[]) {return models.filter(model => model.enabled)- .reduce((groups, model) => {- const provider = model.provider- if (!groups[provider]) {- groups[provider] = []- }- groups[provider].push(model)- return groups- }, {} as Record<string, Model[]>)+ .reduce(+ (groups, model) => {+ const provider = model.provider+ if (!groups[provider]) {+ groups[provider] = []+ }+ groups[provider].push(model)+ return groups+ },+ {} as Record<string, Model[]>+ )}interface ModelSelectorProps {@@ -54,14 +61,16 @@ export function ModelSelector({ models }: ModelSelectorProps) {const handleModelSelect = (id: string) => {const newValue = id === value ? '' : idsetValue(newValue)-- const selectedModel = models.find(model => createModelId(model) === newValue)++ const selectedModel = models.find(+ model => createModelId(model) === newValue+ )if (selectedModel) {setCookie('selectedModel', JSON.stringify(selectedModel))} else {setCookie('selectedModel', '')}-+setOpen(false)}diff --git a/components/question-confirmation.tsx b/components/question-confirmation.tsxindex ee7db408..0a327996 100644--- a/components/question-confirmation.tsx+++ b/components/question-confirmation.tsx@@ -1,12 +1,14 @@'use client'+import { useState } from 'react'++import { ToolInvocation } from 'ai'+import { ArrowRight, Check, SkipForward } from 'lucide-react'+import { Button } from '@/components/ui/button'import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'import { Checkbox } from '@/components/ui/checkbox'import { Input } from '@/components/ui/input'-import { ToolInvocation } from 'ai'-import { ArrowRight, Check, SkipForward } from 'lucide-react'-import { useState } from 'react'interface QuestionConfirmationProps {toolInvocation: ToolInvocationdiff --git a/components/reasoning-section.tsx b/components/reasoning-section.tsxindex 3471a3d8..cd4629f0 100644--- a/components/reasoning-section.tsx+++ b/components/reasoning-section.tsx@@ -1,11 +1,13 @@'use client'-import { Badge } from '@/components/ui/badge'import { Check, Lightbulb, Loader2 } from 'lucide-react'++import { Badge } from '@/components/ui/badge'++import { StatusIndicator } from './ui/status-indicator'import { CollapsibleMessage } from './collapsible-message'import { DefaultSkeleton } from './default-skeleton'import { BotMessage } from './message'-import { StatusIndicator } from './ui/status-indicator'interface ReasoningContent {reasoning: string@@ -32,8 +34,8 @@ export function ReasoningSection({{content.time === 0? 'Thinking...': content.time !== undefined && content.time > 0- ? `Thought for ${(content.time / 1000).toFixed(1)} seconds`- : 'Thoughts'}+ ? `Thought for ${(content.time / 1000).toFixed(1)} seconds`+ : 'Thoughts'}</Badge>{content.time === 0 ? (<Loader2diff --git a/components/related-questions.tsx b/components/related-questions.tsxindex 3d72dcdd..b3b6c38e 100644--- a/components/related-questions.tsx+++ b/components/related-questions.tsx@@ -1,14 +1,17 @@'use client'-import { CHAT_ID } from '@/lib/constants'+import React from 'react'+import { useChat } from '@ai-sdk/react'import { JSONValue } from 'ai'import { ArrowRight } from 'lucide-react'-import React from 'react'-import { CollapsibleMessage } from './collapsible-message'-import { Section } from './section'++import { CHAT_ID } from '@/lib/constants'+import { Button } from './ui/button'import { Skeleton } from './ui/skeleton'+import { CollapsibleMessage } from './collapsible-message'+import { Section } from './section'export interface RelatedQuestionsProps {annotations: JSONValue[]diff --git a/components/render-message.tsx b/components/render-message.tsxindex 827c0ac8..01c332b4 100644--- a/components/render-message.tsx+++ b/components/render-message.tsx@@ -1,5 +1,7 @@-import { ChatRequestOptions, JSONValue, Message, ToolInvocation } from 'ai'import { useMemo } from 'react'++import { ChatRequestOptions, JSONValue, Message, ToolInvocation } from 'ai'+import { AnswerSection } from './answer-section'import { ReasoningSection } from './reasoning-section'import RelatedQuestions from './related-questions'diff --git a/components/retrieve-section.tsx b/components/retrieve-section.tsxindex c3c54488..f0ffc328 100644--- a/components/retrieve-section.tsx+++ b/components/retrieve-section.tsx@@ -1,10 +1,13 @@'use client'+import { ToolInvocation } from 'ai'++import { SearchResults as SearchResultsType } from '@/lib/types'+import { useArtifact } from '@/components/artifact/artifact-context'import { SearchResults } from '@/components/search-results'import { Section, ToolArgsSection } from '@/components/section'-import { SearchResults as SearchResultsType } from '@/lib/types'-import { ToolInvocation } from 'ai'+import { CollapsibleMessage } from './collapsible-message'import { DefaultSkeleton } from './default-skeleton'diff --git a/components/retry-button.tsx b/components/retry-button.tsxindex 0916e100..8260e396 100644--- a/components/retry-button.tsx+++ b/components/retry-button.tsx@@ -1,6 +1,7 @@'use client'import { RotateCcw } from 'lucide-react'+import { Button } from './ui/button'interface RetryButtonProps {diff --git a/components/search-mode-toggle.tsx b/components/search-mode-toggle.tsxindex 5aeea26d..a042a685 100644--- a/components/search-mode-toggle.tsx+++ b/components/search-mode-toggle.tsx@@ -1,9 +1,12 @@'use client'+import { useEffect, useState } from 'react'++import { Globe } from 'lucide-react'+import { cn } from '@/lib/utils'import { getCookie, setCookie } from '@/lib/utils/cookies'-import { Globe } from 'lucide-react'-import { useEffect, useState } from 'react'+import { Toggle } from './ui/toggle'export function SearchModeToggle() {diff --git a/components/search-results-image.tsx b/components/search-results-image.tsxindex b85ab79f..00ba7ad8 100644--- a/components/search-results-image.tsx+++ b/components/search-results-image.tsx@@ -1,6 +1,12 @@/* eslint-disable @next/next/no-img-element */'use client'+import { useEffect, useState } from 'react'++import { PlusCircle } from 'lucide-react'++import { SearchResultImage } from '@/lib/types'+import {Carousel,type CarouselApi,@@ -17,9 +23,6 @@ import {DialogTitle,DialogTrigger} from '@/components/ui/dialog'-import { SearchResultImage } from '@/lib/types'-import { PlusCircle } from 'lucide-react'-import { useEffect, useState } from 'react'interface SearchResultsImageSectionProps {images: SearchResultImage[]@@ -105,7 +108,8 @@ export const SearchResultsImageSection: React.FC<// Determine corner rounding based on index in full mode 2x3 layoutlet cornerClasses = '' // Default to no roundingif (isFullMode) {- if (actualIndex === 0) cornerClasses = 'rounded-tl-lg' // Top-left+ if (actualIndex === 0)+ cornerClasses = 'rounded-tl-lg' // Top-leftelse if (actualIndex === 1)cornerClasses = 'rounded-tr-lg' // Top-rightelse if (actualIndex === 2)diff --git a/components/search-results.tsx b/components/search-results.tsxindex 1cc08c7e..890b4d3a 100644--- a/components/search-results.tsx+++ b/components/search-results.tsx@@ -1,11 +1,13 @@'use client'+import { useState } from 'react'+import Link from 'next/link'++import { SearchResultItem } from '@/lib/types'+import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'import { Button } from '@/components/ui/button'import { Card, CardContent } from '@/components/ui/card'-import { SearchResultItem } from '@/lib/types'-import Link from 'next/link'-import { useState } from 'react'export interface SearchResultsProps {results: SearchResultItem[]diff --git a/components/search-section.tsx b/components/search-section.tsxindex b4aac733..c17ad2a0 100644--- a/components/search-section.tsx+++ b/components/search-section.tsx@@ -1,10 +1,13 @@'use client'-import { useArtifact } from '@/components/artifact/artifact-context'-import { CHAT_ID } from '@/lib/constants'-import type { SearchResults as TypeSearchResults } from '@/lib/types'import { useChat } from '@ai-sdk/react'import { ToolInvocation } from 'ai'++import { CHAT_ID } from '@/lib/constants'+import type { SearchResults as TypeSearchResults } from '@/lib/types'++import { useArtifact } from '@/components/artifact/artifact-context'+import { CollapsibleMessage } from './collapsible-message'import { SearchSkeleton } from './default-skeleton'import { SearchResults } from './search-results'diff --git a/components/section.tsx b/components/section.tsxindex 973a412e..55c5751d 100644--- a/components/section.tsx+++ b/components/section.tsx@@ -1,6 +1,7 @@'use client'-import { cn } from '@/lib/utils'+import React from 'react'+import {BookCheck,Check,@@ -12,11 +13,13 @@ import {Repeat2,Search} from 'lucide-react'-import React from 'react'-import { ToolBadge } from './tool-badge'++import { cn } from '@/lib/utils'+import { Badge } from './ui/badge'import { Separator } from './ui/separator'import { StatusIndicator } from './ui/status-indicator'+import { ToolBadge } from './tool-badge'type SectionProps = {children: React.ReactNodediff --git a/components/sidebar/chat-history-client.tsx b/components/sidebar/chat-history-client.tsxindex 7abc96b4..5cf4c754 100644--- a/components/sidebar/chat-history-client.tsx+++ b/components/sidebar/chat-history-client.tsx@@ -1,13 +1,17 @@'use client'+import { useCallback, useEffect, useRef, useState, useTransition } from 'react'++import { toast } from 'sonner'++import { Chat } from '@/lib/types'+import {SidebarGroup,SidebarGroupLabel,SidebarMenu} from '@/components/ui/sidebar'-import { Chat } from '@/lib/types'-import { useCallback, useEffect, useRef, useState, useTransition } from 'react'-import { toast } from 'sonner'+import { ChatHistorySkeleton } from './chat-history-skeleton'import { ChatMenuItem } from './chat-menu-item'import { ClearHistoryAction } from './clear-history-action'diff --git a/components/sidebar/chat-menu-item.tsx b/components/sidebar/chat-menu-item.tsxindex c95d8778..5f213d03 100644--- a/components/sidebar/chat-menu-item.tsx+++ b/components/sidebar/chat-menu-item.tsx@@ -1,5 +1,14 @@'use client'+import { useState, useTransition } from 'react'+import Link from 'next/link'+import { usePathname, useRouter } from 'next/navigation'++import { MoreHorizontal, Trash2 } from 'lucide-react'+import { toast } from 'sonner'++import { Chat } from '@/lib/types'+import {AlertDialog,AlertDialogAction,@@ -22,12 +31,7 @@ import {SidebarMenuButton,SidebarMenuItem} from '@/components/ui/sidebar'-import { Chat } from '@/lib/types'-import { MoreHorizontal, Trash2 } from 'lucide-react'-import Link from 'next/link'-import { usePathname, useRouter } from 'next/navigation'-import { useState, useTransition } from 'react'-import { toast } from 'sonner'+import { Spinner } from '../ui/spinner'interface ChatMenuItemProps {diff --git a/components/sidebar/clear-history-action.tsx b/components/sidebar/clear-history-action.tsxindex f6b23f5b..4ac10e29 100644--- a/components/sidebar/clear-history-action.tsx+++ b/components/sidebar/clear-history-action.tsx@@ -1,5 +1,12 @@'use client'+import { useState, useTransition } from 'react'++import { MoreHorizontal, Trash2 } from 'lucide-react'+import { toast } from 'sonner'++import { clearChats } from '@/lib/actions/chat'+import {AlertDialog,AlertDialogAction,@@ -19,10 +26,6 @@ import {} from '@/components/ui/dropdown-menu'import { SidebarGroupAction } from '@/components/ui/sidebar'import { Spinner } from '@/components/ui/spinner'-import { clearChats } from '@/lib/actions/chat'-import { MoreHorizontal, Trash2 } from 'lucide-react'-import { useState, useTransition } from 'react'-import { toast } from 'sonner'interface ClearHistoryActionProps {empty: booleandiff --git a/components/sign-up-form.tsx b/components/sign-up-form.tsxindex 1ff06cb7..75173ef6 100644--- a/components/sign-up-form.tsx+++ b/components/sign-up-form.tsx@@ -1,5 +1,12 @@'use client'+import { useState } from 'react'+import Link from 'next/link'+import { useRouter } from 'next/navigation'++import { createClient } from '@/lib/supabase/client'+import { cn } from '@/lib/utils/index'+import { Button } from '@/components/ui/button'import {Card,@@ -11,11 +18,6 @@ import {import { IconLogo } from '@/components/ui/icons'import { Input } from '@/components/ui/input'import { Label } from '@/components/ui/label'-import { createClient } from '@/lib/supabase/client'-import { cn } from '@/lib/utils/index'-import Link from 'next/link'-import { useRouter } from 'next/navigation'-import { useState } from 'react'export function SignUpForm({className,diff --git a/components/theme-menu-items.tsx b/components/theme-menu-items.tsxindex 4960eab0..0c5b99df 100644--- a/components/theme-menu-items.tsx+++ b/components/theme-menu-items.tsx@@ -1,9 +1,11 @@'use client'-import { DropdownMenuItem } from '@/components/ui/dropdown-menu'-import { Laptop, Moon, Sun } from 'lucide-react'import { useTheme } from 'next-themes'+import { Laptop, Moon, Sun } from 'lucide-react'++import { DropdownMenuItem } from '@/components/ui/dropdown-menu'+export function ThemeMenuItems() {const { setTheme } = useTheme()diff --git a/components/tool-badge.tsx b/components/tool-badge.tsxindex 3a094428..d7b405de 100644--- a/components/tool-badge.tsx+++ b/components/tool-badge.tsx@@ -1,5 +1,7 @@-import { Film, Link, Search } from 'lucide-react'import React from 'react'++import { Film, Link, Search } from 'lucide-react'+import { Badge } from './ui/badge'type ToolBadgeProps = {diff --git a/components/tool-section.tsx b/components/tool-section.tsxindex 771b4c28..98ad2c16 100644--- a/components/tool-section.tsx+++ b/components/tool-section.tsx@@ -1,6 +1,7 @@'use client'import { ToolInvocation } from 'ai'+import { QuestionConfirmation } from './question-confirmation'import RetrieveSection from './retrieve-section'import { SearchSection } from './search-section'diff --git a/components/ui/alert-dialog.tsx b/components/ui/alert-dialog.tsxindex 25e7b474..cf7ddcaa 100644--- a/components/ui/alert-dialog.tsx+++ b/components/ui/alert-dialog.tsx@@ -1,10 +1,12 @@-"use client"+'use client'-import * as React from "react"-import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"+import * as React from 'react'-import { cn } from "@/lib/utils"-import { buttonVariants } from "@/components/ui/button"+import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'++import { cn } from '@/lib/utils'++import { buttonVariants } from '@/components/ui/button'const AlertDialog = AlertDialogPrimitive.Root@@ -18,7 +20,7 @@ const AlertDialogOverlay = React.forwardRef<>(({ className, ...props }, ref) => (<AlertDialogPrimitive.OverlayclassName={cn(- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",+ 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',className)}{...props}@@ -36,7 +38,7 @@ const AlertDialogContent = React.forwardRef<<AlertDialogPrimitive.Contentref={ref}className={cn(- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",+ 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',className)}{...props}@@ -51,13 +53,13 @@ const AlertDialogHeader = ({}: React.HTMLAttributes<HTMLDivElement>) => (<divclassName={cn(- "flex flex-col space-y-2 text-center sm:text-left",+ 'flex flex-col space-y-2 text-center sm:text-left',className)}{...props}/>)-AlertDialogHeader.displayName = "AlertDialogHeader"+AlertDialogHeader.displayName = 'AlertDialogHeader'const AlertDialogFooter = ({className,@@ -65,13 +67,13 @@ const AlertDialogFooter = ({}: React.HTMLAttributes<HTMLDivElement>) => (<divclassName={cn(- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",+ 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',className)}{...props}/>)-AlertDialogFooter.displayName = "AlertDialogFooter"+AlertDialogFooter.displayName = 'AlertDialogFooter'const AlertDialogTitle = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Title>,@@ -79,7 +81,7 @@ const AlertDialogTitle = React.forwardRef<>(({ className, ...props }, ref) => (<AlertDialogPrimitive.Titleref={ref}- className={cn("text-lg font-semibold", className)}+ className={cn('text-lg font-semibold', className)}{...props}/>))@@ -91,7 +93,7 @@ const AlertDialogDescription = React.forwardRef<>(({ className, ...props }, ref) => (<AlertDialogPrimitive.Descriptionref={ref}- className={cn("text-sm text-muted-foreground", className)}+ className={cn('text-sm text-muted-foreground', className)}{...props}/>))@@ -117,8 +119,8 @@ const AlertDialogCancel = React.forwardRef<<AlertDialogPrimitive.Cancelref={ref}className={cn(- buttonVariants({ variant: "outline" }),- "mt-2 sm:mt-0",+ buttonVariants({ variant: 'outline' }),+ 'mt-2 sm:mt-0',className)}{...props}@@ -128,14 +130,14 @@ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayNameexport {AlertDialog,- AlertDialogPortal,- AlertDialogOverlay,- AlertDialogTrigger,+ AlertDialogAction,+ AlertDialogCancel,AlertDialogContent,- AlertDialogHeader,+ AlertDialogDescription,AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogOverlay,+ AlertDialogPortal,AlertDialogTitle,- AlertDialogDescription,- AlertDialogAction,- AlertDialogCancel,+ AlertDialogTrigger}diff --git a/components/ui/avatar.tsx b/components/ui/avatar.tsxindex 1a5543ea..48d774c5 100644--- a/components/ui/avatar.tsx+++ b/components/ui/avatar.tsx@@ -1,8 +1,9 @@'use client'-import * as AvatarPrimitive from '@radix-ui/react-avatar'import * as React from 'react'+import * as AvatarPrimitive from '@radix-ui/react-avatar'+import { cn } from '@/lib/utils/index'const Avatar = React.forwardRef<diff --git a/components/ui/badge.tsx b/components/ui/badge.tsxindex d9a84b39..45ea791f 100644--- a/components/ui/badge.tsx+++ b/components/ui/badge.tsx@@ -1,4 +1,5 @@import * as React from 'react'+import { cva, type VariantProps } from 'class-variance-authority'import { cn } from '@/lib/utils'diff --git a/components/ui/button.tsx b/components/ui/button.tsxindex 72889051..7a9b8bf6 100644--- a/components/ui/button.tsx+++ b/components/ui/button.tsx@@ -1,4 +1,5 @@import * as React from 'react'+import { Slot } from '@radix-ui/react-slot'import { cva, type VariantProps } from 'class-variance-authority'diff --git a/components/ui/card.tsx b/components/ui/card.tsxindex f9a373cc..6d9e1969 100644--- a/components/ui/card.tsx+++ b/components/ui/card.tsx@@ -76,4 +76,4 @@ const CardFooter = React.forwardRef<))CardFooter.displayName = 'CardFooter'-export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }+export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }diff --git a/components/ui/carousel.tsx b/components/ui/carousel.tsxindex 52f8fcff..4cbc73a3 100644--- a/components/ui/carousel.tsx+++ b/components/ui/carousel.tsx@@ -1,12 +1,14 @@'use client'import * as React from 'react'+import useEmblaCarousel, {type UseEmblaCarouselType} from 'embla-carousel-react'import { ArrowLeft, ArrowRight } from 'lucide-react'import { cn } from '@/lib/utils'+import { Button } from '@/components/ui/button'type CarouselApi = UseEmblaCarouselType[1]@@ -253,10 +255,10 @@ const CarouselNext = React.forwardRef<CarouselNext.displayName = 'CarouselNext'export {- type CarouselApi,Carousel,+ type CarouselApi,CarouselContent,CarouselItem,- CarouselPrevious,- CarouselNext+ CarouselNext,+ CarouselPrevious}diff --git a/components/ui/checkbox.tsx b/components/ui/checkbox.tsxindex 774ee9ee..1470fbbe 100644--- a/components/ui/checkbox.tsx+++ b/components/ui/checkbox.tsx@@ -1,6 +1,7 @@'use client'import * as React from 'react'+import * as CheckboxPrimitive from '@radix-ui/react-checkbox'import { Check } from 'lucide-react'diff --git a/components/ui/codeblock.tsx b/components/ui/codeblock.tsxindex ac353da6..b3f4606b 100644--- a/components/ui/codeblock.tsx+++ b/components/ui/codeblock.tsx@@ -7,11 +7,13 @@ import { FC, memo } from 'react'import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'import { coldarkDark } from 'react-syntax-highlighter/dist/cjs/styles/prism'-import { useCopyToClipboard } from '@/lib/hooks/use-copy-to-clipboard'-import { Button } from '@/components/ui/button'import { generateId } from 'ai'import { Check, Copy, Download } from 'lucide-react'+import { useCopyToClipboard } from '@/lib/hooks/use-copy-to-clipboard'++import { Button } from '@/components/ui/button'+interface Props {language: stringvalue: stringdiff --git a/components/ui/collapsible.tsx b/components/ui/collapsible.tsxindex 9fa48946..7ca0f07f 100644--- a/components/ui/collapsible.tsx+++ b/components/ui/collapsible.tsx@@ -1,6 +1,6 @@-"use client"+'use client'-import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"+import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'const Collapsible = CollapsiblePrimitive.Root@@ -8,4 +8,4 @@ const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTriggerconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent-export { Collapsible, CollapsibleTrigger, CollapsibleContent }+export { Collapsible, CollapsibleContent, CollapsibleTrigger }diff --git a/components/ui/command.tsx b/components/ui/command.tsxindex 59a26452..14be2bd6 100644--- a/components/ui/command.tsx+++ b/components/ui/command.tsx@@ -1,12 +1,14 @@-"use client"+'use client'-import * as React from "react"-import { type DialogProps } from "@radix-ui/react-dialog"-import { Command as CommandPrimitive } from "cmdk"-import { Search } from "lucide-react"+import * as React from 'react'-import { cn } from "@/lib/utils"-import { Dialog, DialogContent } from "@/components/ui/dialog"+import { type DialogProps } from '@radix-ui/react-dialog'+import { Command as CommandPrimitive } from 'cmdk'+import { Search } from 'lucide-react'++import { cn } from '@/lib/utils'++import { Dialog, DialogContent } from '@/components/ui/dialog'const Command = React.forwardRef<React.ElementRef<typeof CommandPrimitive>,@@ -15,7 +17,7 @@ const Command = React.forwardRef<<CommandPrimitiveref={ref}className={cn(- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",+ 'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',className)}{...props}@@ -44,7 +46,7 @@ const CommandInput = React.forwardRef<<CommandPrimitive.Inputref={ref}className={cn(- "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",+ 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',className)}{...props}@@ -60,7 +62,7 @@ const CommandList = React.forwardRef<>(({ className, ...props }, ref) => (<CommandPrimitive.Listref={ref}- className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}+ className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}{...props}/>))@@ -87,7 +89,7 @@ const CommandGroup = React.forwardRef<<CommandPrimitive.Groupref={ref}className={cn(- "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",+ 'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',className)}{...props}@@ -102,7 +104,7 @@ const CommandSeparator = React.forwardRef<>(({ className, ...props }, ref) => (<CommandPrimitive.Separatorref={ref}- className={cn("-mx-1 h-px bg-border", className)}+ className={cn('-mx-1 h-px bg-border', className)}{...props}/>))@@ -131,23 +133,23 @@ const CommandShortcut = ({return (<spanclassName={cn(- "ml-auto text-xs tracking-widest text-muted-foreground",+ 'ml-auto text-xs tracking-widest text-muted-foreground',className)}{...props}/>)}-CommandShortcut.displayName = "CommandShortcut"+CommandShortcut.displayName = 'CommandShortcut'export {Command,CommandDialog,- CommandInput,- CommandList,CommandEmpty,CommandGroup,+ CommandInput,CommandItem,- CommandShortcut,+ CommandList,CommandSeparator,+ CommandShortcut}diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsxindex 01ff19c7..539d96db 100644--- a/components/ui/dialog.tsx+++ b/components/ui/dialog.tsx@@ -1,10 +1,11 @@-"use client"+'use client'-import * as React from "react"-import * as DialogPrimitive from "@radix-ui/react-dialog"-import { X } from "lucide-react"+import * as React from 'react'-import { cn } from "@/lib/utils"+import * as DialogPrimitive from '@radix-ui/react-dialog'+import { X } from 'lucide-react'++import { cn } from '@/lib/utils'const Dialog = DialogPrimitive.Root@@ -21,7 +22,7 @@ const DialogOverlay = React.forwardRef<<DialogPrimitive.Overlayref={ref}className={cn(- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",+ 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',className)}{...props}@@ -38,7 +39,7 @@ const DialogContent = React.forwardRef<<DialogPrimitive.Contentref={ref}className={cn(- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",+ 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',className)}{...props}@@ -59,13 +60,13 @@ const DialogHeader = ({}: React.HTMLAttributes<HTMLDivElement>) => (<divclassName={cn(- "flex flex-col space-y-1.5 text-center sm:text-left",+ 'flex flex-col space-y-1.5 text-center sm:text-left',className)}{...props}/>)-DialogHeader.displayName = "DialogHeader"+DialogHeader.displayName = 'DialogHeader'const DialogFooter = ({className,@@ -73,13 +74,13 @@ const DialogFooter = ({}: React.HTMLAttributes<HTMLDivElement>) => (<divclassName={cn(- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",+ 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',className)}{...props}/>)-DialogFooter.displayName = "DialogFooter"+DialogFooter.displayName = 'DialogFooter'const DialogTitle = React.forwardRef<React.ElementRef<typeof DialogPrimitive.Title>,@@ -88,7 +89,7 @@ const DialogTitle = React.forwardRef<<DialogPrimitive.Titleref={ref}className={cn(- "text-lg font-semibold leading-none tracking-tight",+ 'text-lg font-semibold leading-none tracking-tight',className)}{...props}@@ -102,7 +103,7 @@ const DialogDescription = React.forwardRef<>(({ className, ...props }, ref) => (<DialogPrimitive.Descriptionref={ref}- className={cn("text-sm text-muted-foreground", className)}+ className={cn('text-sm text-muted-foreground', className)}{...props}/>))@@ -110,13 +111,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayNameexport {Dialog,- DialogPortal,- DialogOverlay,DialogClose,- DialogTrigger,DialogContent,- DialogHeader,+ DialogDescription,DialogFooter,+ DialogHeader,+ DialogOverlay,+ DialogPortal,DialogTitle,- DialogDescription,+ DialogTrigger}diff --git a/components/ui/drawer.tsx b/components/ui/drawer.tsxindex 45eb821e..5f9784ca 100644--- a/components/ui/drawer.tsx+++ b/components/ui/drawer.tsx@@ -1,9 +1,10 @@-"use client"+'use client'-import * as React from "react"-import { Drawer as DrawerPrimitive } from "vaul"+import * as React from 'react'-import { cn } from "@/lib/utils/index"+import { Drawer as DrawerPrimitive } from 'vaul'++import { cn } from '@/lib/utils/index'const Drawer = ({shouldScaleBackground = true,@@ -14,7 +15,7 @@ const Drawer = ({{...props}/>)-Drawer.displayName = "Drawer"+Drawer.displayName = 'Drawer'const DrawerTrigger = DrawerPrimitive.Trigger@@ -28,7 +29,7 @@ const DrawerOverlay = React.forwardRef<>(({ className, ...props }, ref) => (<DrawerPrimitive.Overlayref={ref}- className={cn("fixed inset-0 z-50 bg-black/80", className)}+ className={cn('fixed inset-0 z-50 bg-black/80', className)}{...props}/>))@@ -43,7 +44,7 @@ const DrawerContent = React.forwardRef<<DrawerPrimitive.Contentref={ref}className={cn(- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",+ 'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background',className)}{...props}@@ -53,29 +54,29 @@ const DrawerContent = React.forwardRef<</DrawerPrimitive.Content></DrawerPortal>))-DrawerContent.displayName = "DrawerContent"+DrawerContent.displayName = 'DrawerContent'const DrawerHeader = ({className,...props}: React.HTMLAttributes<HTMLDivElement>) => (<div- className={cn("grid gap-1.5 p-4 text-center sm:text-left", className)}+ className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)}{...props}/>)-DrawerHeader.displayName = "DrawerHeader"+DrawerHeader.displayName = 'DrawerHeader'const DrawerFooter = ({className,...props}: React.HTMLAttributes<HTMLDivElement>) => (<div- className={cn("mt-auto flex flex-col gap-2 p-4", className)}+ className={cn('mt-auto flex flex-col gap-2 p-4', className)}{...props}/>)-DrawerFooter.displayName = "DrawerFooter"+DrawerFooter.displayName = 'DrawerFooter'const DrawerTitle = React.forwardRef<React.ElementRef<typeof DrawerPrimitive.Title>,@@ -84,7 +85,7 @@ const DrawerTitle = React.forwardRef<<DrawerPrimitive.Titleref={ref}className={cn(- "text-lg font-semibold leading-none tracking-tight",+ 'text-lg font-semibold leading-none tracking-tight',className)}{...props}@@ -98,7 +99,7 @@ const DrawerDescription = React.forwardRef<>(({ className, ...props }, ref) => (<DrawerPrimitive.Descriptionref={ref}- className={cn("text-sm text-muted-foreground", className)}+ className={cn('text-sm text-muted-foreground', className)}{...props}/>))@@ -106,13 +107,13 @@ DrawerDescription.displayName = DrawerPrimitive.Description.displayNameexport {Drawer,- DrawerPortal,- DrawerOverlay,- DrawerTrigger,DrawerClose,DrawerContent,- DrawerHeader,+ DrawerDescription,DrawerFooter,+ DrawerHeader,+ DrawerOverlay,+ DrawerPortal,DrawerTitle,- DrawerDescription,+ DrawerTrigger}diff --git a/components/ui/dropdown-menu.tsx b/components/ui/dropdown-menu.tsxindex b0744124..04cfb5eb 100644--- a/components/ui/dropdown-menu.tsx+++ b/components/ui/dropdown-menu.tsx@@ -1,6 +1,7 @@'use client'import * as React from 'react'+import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'import { Check, ChevronRight, Circle } from 'lucide-react'@@ -183,18 +184,18 @@ DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'export {DropdownMenu,- DropdownMenuTrigger,+ DropdownMenuCheckboxItem,DropdownMenuContent,+ DropdownMenuGroup,DropdownMenuItem,- DropdownMenuCheckboxItem,- DropdownMenuRadioItem,DropdownMenuLabel,+ DropdownMenuPortal,+ DropdownMenuRadioGroup,+ DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,- DropdownMenuGroup,- DropdownMenuPortal,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,- DropdownMenuRadioGroup+ DropdownMenuTrigger}diff --git a/components/ui/label.tsx b/components/ui/label.tsxindex 5f2488bd..adeda93e 100644--- a/components/ui/label.tsx+++ b/components/ui/label.tsx@@ -1,6 +1,7 @@'use client'import * as React from 'react'+import * as LabelPrimitive from '@radix-ui/react-label'import { cva, type VariantProps } from 'class-variance-authority'diff --git a/components/ui/popover.tsx b/components/ui/popover.tsxindex a0ec48be..b8232b6b 100644--- a/components/ui/popover.tsx+++ b/components/ui/popover.tsx@@ -1,9 +1,10 @@-"use client"+'use client'-import * as React from "react"-import * as PopoverPrimitive from "@radix-ui/react-popover"+import * as React from 'react'-import { cn } from "@/lib/utils"+import * as PopoverPrimitive from '@radix-ui/react-popover'++import { cn } from '@/lib/utils'const Popover = PopoverPrimitive.Root@@ -12,14 +13,14 @@ const PopoverTrigger = PopoverPrimitive.Triggerconst PopoverContent = React.forwardRef<React.ElementRef<typeof PopoverPrimitive.Content>,React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>->(({ className, align = "center", sideOffset = 4, ...props }, ref) => (+>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (<PopoverPrimitive.Portal><PopoverPrimitive.Contentref={ref}align={align}sideOffset={sideOffset}className={cn(- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ 'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',className)}{...props}@@ -28,4 +29,4 @@ const PopoverContent = React.forwardRef<))PopoverContent.displayName = PopoverPrimitive.Content.displayName-export { Popover, PopoverTrigger, PopoverContent }+export { Popover, PopoverContent, PopoverTrigger }diff --git a/components/ui/resizable.tsx b/components/ui/resizable.tsxindex aaad6fb4..9aff8691 100644--- a/components/ui/resizable.tsx+++ b/components/ui/resizable.tsx@@ -1,8 +1,9 @@'use client'-import { GripVertical } from 'lucide-react'import * as ResizablePrimitive from 'react-resizable-panels'+import { GripVertical } from 'lucide-react'+import { cn } from '@/lib/utils/index'const ResizablePanelGroup = ({diff --git a/components/ui/select.tsx b/components/ui/select.tsxindex aed4c298..fa063bce 100644--- a/components/ui/select.tsx+++ b/components/ui/select.tsx@@ -1,6 +1,7 @@'use client'import * as React from 'react'+import * as SelectPrimitive from '@radix-ui/react-select'import { Check, ChevronDown, ChevronUp } from 'lucide-react'@@ -148,13 +149,13 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayNameexport {Select,- SelectGroup,- SelectValue,- SelectTrigger,SelectContent,- SelectLabel,+ SelectGroup,SelectItem,- SelectSeparator,+ SelectLabel,+ SelectScrollDownButton,SelectScrollUpButton,- SelectScrollDownButton+ SelectSeparator,+ SelectTrigger,+ SelectValue}diff --git a/components/ui/separator.tsx b/components/ui/separator.tsxindex beb7809d..a489c61f 100644--- a/components/ui/separator.tsx+++ b/components/ui/separator.tsx@@ -1,6 +1,7 @@'use client'import * as React from 'react'+import * as SeparatorPrimitive from '@radix-ui/react-separator'import { cn } from '@/lib/utils/index'diff --git a/components/ui/sheet.tsx b/components/ui/sheet.tsxindex 2bacf2de..4334f770 100644--- a/components/ui/sheet.tsx+++ b/components/ui/sheet.tsx@@ -1,6 +1,7 @@'use client'import * as React from 'react'+import * as SheetPrimitive from '@radix-ui/react-dialog'import { cva, type VariantProps } from 'class-variance-authority'import { X } from 'lucide-react'@@ -128,13 +129,13 @@ SheetDescription.displayName = SheetPrimitive.Description.displayNameexport {Sheet,- SheetPortal,- SheetOverlay,- SheetTrigger,SheetClose,SheetContent,- SheetHeader,+ SheetDescription,SheetFooter,+ SheetHeader,+ SheetOverlay,+ SheetPortal,SheetTitle,- SheetDescription+ SheetTrigger}diff --git a/components/ui/sidebar.tsx b/components/ui/sidebar.tsxindex 5de2fa89..e8fe2877 100644--- a/components/ui/sidebar.tsx+++ b/components/ui/sidebar.tsx@@ -1,9 +1,14 @@'use client'+import * as React from 'react'+import { Slot } from '@radix-ui/react-slot'-import { VariantProps, cva } from 'class-variance-authority'+import { cva, VariantProps } from 'class-variance-authority'import { PanelLeft } from 'lucide-react'-import * as React from 'react'++import { cn } from '@/lib/utils/index'++import { useIsMobile } from '@/hooks/use-mobile'import { Button } from '@/components/ui/button'import { Input } from '@/components/ui/input'@@ -22,8 +27,6 @@ import {TooltipProvider,TooltipTrigger} from '@/components/ui/tooltip'-import { useIsMobile } from '@/hooks/use-mobile'-import { cn } from '@/lib/utils/index'const SIDEBAR_COOKIE_NAME = 'sidebar_state'const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7diff --git a/components/ui/slider.tsx b/components/ui/slider.tsxindex de1747ce..a41d1a13 100644--- a/components/ui/slider.tsx+++ b/components/ui/slider.tsx@@ -1,6 +1,7 @@'use client'import * as React from 'react'+import * as SliderPrimitive from '@radix-ui/react-slider'import { cn } from '@/lib/utils'diff --git a/components/ui/sonner.tsx b/components/ui/sonner.tsxindex 452f4d9f..a766fcee 100644--- a/components/ui/sonner.tsx+++ b/components/ui/sonner.tsx@@ -1,27 +1,28 @@-"use client"+'use client'-import { useTheme } from "next-themes"-import { Toaster as Sonner } from "sonner"+import { useTheme } from 'next-themes'++import { Toaster as Sonner } from 'sonner'type ToasterProps = React.ComponentProps<typeof Sonner>const Toaster = ({ ...props }: ToasterProps) => {- const { theme = "system" } = useTheme()+ const { theme = 'system' } = useTheme()return (<Sonner- theme={theme as ToasterProps["theme"]}+ theme={theme as ToasterProps['theme']}className="toaster group"toastOptions={{classNames: {toast:- "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",- description: "group-[.toast]:text-muted-foreground",+ 'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',+ description: 'group-[.toast]:text-muted-foreground',actionButton:- "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",+ 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',cancelButton:- "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",- },+ 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground'+ }}}{...props}/>diff --git a/components/ui/spinner.tsx b/components/ui/spinner.tsxindex 1cf111dc..07bf01a2 100644--- a/components/ui/spinner.tsx+++ b/components/ui/spinner.tsx@@ -1,6 +1,7 @@// Based on: https://github.com/vercel/ai/blob/main/examples/next-ai-rsc/components/llm-stocks/spinner.tsximport { cn } from '@/lib/utils'+import { IconLogo } from './icons'interface SpinnerProps extends React.SVGProps<SVGSVGElement> {}diff --git a/components/ui/status-indicator.tsx b/components/ui/status-indicator.tsxindex 0cc106bd..9972b71b 100644--- a/components/ui/status-indicator.tsx+++ b/components/ui/status-indicator.tsx@@ -1,6 +1,7 @@-import { LucideIcon } from 'lucide-react'import { ReactNode } from 'react'+import { LucideIcon } from 'lucide-react'+interface StatusIndicatorProps {icon: LucideIconiconClassName?: stringdiff --git a/components/ui/switch.tsx b/components/ui/switch.tsxindex 22432b9c..056d4402 100644--- a/components/ui/switch.tsx+++ b/components/ui/switch.tsx@@ -1,6 +1,7 @@'use client'import * as React from 'react'+import * as SwitchPrimitives from '@radix-ui/react-switch'import { cn } from '@/lib/utils'diff --git a/components/ui/toggle.tsx b/components/ui/toggle.tsxindex dbd978cc..92b95376 100644--- a/components/ui/toggle.tsx+++ b/components/ui/toggle.tsx@@ -1,8 +1,9 @@'use client'+import * as React from 'react'+import * as TogglePrimitive from '@radix-ui/react-toggle'import { cva, type VariantProps } from 'class-variance-authority'-import * as React from 'react'import { cn } from '@/lib/utils'diff --git a/components/ui/tooltip-button.tsx b/components/ui/tooltip-button.tsxindex 934d8a3f..30dc5945 100644--- a/components/ui/tooltip-button.tsx+++ b/components/ui/tooltip-button.tsx@@ -1,6 +1,7 @@'use client'import * as React from 'react'+import { Button, ButtonProps } from '@/components/ui/button'import {Tooltip,@@ -13,9 +14,14 @@ interface TooltipButtonProps extends ButtonProps {* The tooltip content to display.* Can be a string or TooltipContent props.*/- tooltipContent: string | Omit<React.ComponentPropsWithoutRef<typeof TooltipContent>, 'children'> & {- children: React.ReactNode- }+ tooltipContent:+ | string+ | (Omit<+ React.ComponentPropsWithoutRef<typeof TooltipContent>,+ 'children'+ > & {+ children: React.ReactNode+ })/*** The content of the button.*/diff --git a/components/ui/tooltip.tsx b/components/ui/tooltip.tsxindex c8cfaf1a..7d4feea1 100644--- a/components/ui/tooltip.tsx+++ b/components/ui/tooltip.tsx@@ -1,9 +1,10 @@-"use client"+'use client'-import * as React from "react"-import * as TooltipPrimitive from "@radix-ui/react-tooltip"+import * as React from 'react'-import { cn } from "@/lib/utils/index"+import * as TooltipPrimitive from '@radix-ui/react-tooltip'++import { cn } from '@/lib/utils/index'const TooltipProvider = TooltipPrimitive.Provider@@ -19,7 +20,7 @@ const TooltipContent = React.forwardRef<ref={ref}sideOffset={sideOffset}className={cn(- "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ 'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',className)}{...props}@@ -27,4 +28,4 @@ const TooltipContent = React.forwardRef<))TooltipContent.displayName = TooltipPrimitive.Content.displayName-export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }+export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }diff --git a/components/update-password-form.tsx b/components/update-password-form.tsxindex b82827d6..70cc4e7a 100644--- a/components/update-password-form.tsx+++ b/components/update-password-form.tsx@@ -1,5 +1,11 @@'use client'+import { useState } from 'react'+import { useRouter } from 'next/navigation'++import { createClient } from '@/lib/supabase/client'+import { cn } from '@/lib/utils/index'+import { Button } from '@/components/ui/button'import {Card,@@ -10,10 +16,6 @@ import {} from '@/components/ui/card'import { Input } from '@/components/ui/input'import { Label } from '@/components/ui/label'-import { createClient } from '@/lib/supabase/client'-import { cn } from '@/lib/utils/index'-import { useRouter } from 'next/navigation'-import { useState } from 'react'export function UpdatePasswordForm({className,diff --git a/components/user-menu.tsx b/components/user-menu.tsxindex d555a35b..f43bea97 100644--- a/components/user-menu.tsx+++ b/components/user-menu.tsx@@ -1,5 +1,12 @@'use client'+import { useRouter } from 'next/navigation'++import { User } from '@supabase/supabase-js'+import { Link2, LogOut, Palette } from 'lucide-react'++import { createClient } from '@/lib/supabase/client'+import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'import {DropdownMenu,@@ -12,13 +19,10 @@ import {DropdownMenuSubTrigger,DropdownMenuTrigger} from '@/components/ui/dropdown-menu'-import { createClient } from '@/lib/supabase/client'-import { User } from '@supabase/supabase-js'-import { Link2, LogOut, Palette } from 'lucide-react'-import { useRouter } from 'next/navigation'++import { Button } from './ui/button'import { ExternalLinkItems } from './external-link-items'import { ThemeMenuItems } from './theme-menu-items'-import { Button } from './ui/button'interface UserMenuProps {user: Userdiff --git a/components/user-message.tsx b/components/user-message.tsxindex f6b3e2f2..ba4a0972 100644--- a/components/user-message.tsx+++ b/components/user-message.tsx@@ -1,11 +1,14 @@'use client'-import { cn } from '@/lib/utils'-import { Pencil } from 'lucide-react'import React, { useState } from 'react'import TextareaAutosize from 'react-textarea-autosize'-import { CollapsibleMessage } from './collapsible-message'++import { Pencil } from 'lucide-react'++import { cn } from '@/lib/utils'+import { Button } from './ui/button'+import { CollapsibleMessage } from './collapsible-message'type UserMessageProps = {message: stringdiff --git a/components/video-carousel-dialog.tsx b/components/video-carousel-dialog.tsxindex 2c7f6871..c2890495 100644--- a/components/video-carousel-dialog.tsx+++ b/components/video-carousel-dialog.tsx@@ -1,5 +1,9 @@'use client'+import { useEffect, useRef, useState } from 'react'++import { SerperSearchResultItem } from '@/lib/types'+import {Carousel,type CarouselApi,@@ -16,8 +20,6 @@ import {DialogTitle,DialogTrigger} from '@/components/ui/dialog'-import { SerperSearchResultItem } from '@/lib/types'-import { useEffect, useRef, useState } from 'react'interface VideoCarouselDialogProps {children: React.ReactNodediff --git a/components/video-result-grid.tsx b/components/video-result-grid.tsxindex 0170ef27..6da25511 100644--- a/components/video-result-grid.tsx+++ b/components/video-result-grid.tsx@@ -1,10 +1,14 @@'use client'+import Image from 'next/image'++import { PlusCircle } from 'lucide-react'++import { SerperSearchResultItem } from '@/lib/types'+import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'import { Card, CardContent } from '@/components/ui/card'-import { SerperSearchResultItem } from '@/lib/types'-import { PlusCircle } from 'lucide-react'-import Image from 'next/image'+import { VideoCarouselDialog } from './video-carousel-dialog'interface VideoResultGridProps {diff --git a/components/video-search-results.tsx b/components/video-search-results.tsxindex 14293c53..f754b499 100644--- a/components/video-search-results.tsx+++ b/components/video-search-results.tsx@@ -2,6 +2,7 @@'use client'import { SerperSearchResultItem, SerperSearchResults } from '@/lib/types'+import { VideoResultGrid } from './video-result-grid'export interface VideoSearchResultsProps {diff --git a/components/video-search-section.tsx b/components/video-search-section.tsxindex c016fb1d..f39cc28f 100644--- a/components/video-search-section.tsx+++ b/components/video-search-section.tsx@@ -1,10 +1,13 @@'use client'-import { useArtifact } from '@/components/artifact/artifact-context'-import { CHAT_ID } from '@/lib/constants'-import type { SerperSearchResults } from '@/lib/types'import { useChat } from '@ai-sdk/react'import { ToolInvocation } from 'ai'++import { CHAT_ID } from '@/lib/constants'+import type { SerperSearchResults } from '@/lib/types'++import { useArtifact } from '@/components/artifact/artifact-context'+import { CollapsibleMessage } from './collapsible-message'import { DefaultSkeleton } from './default-skeleton'import { Section, ToolArgsSection } from './section'diff --git a/hooks/use-mobile.tsx b/hooks/use-mobile.tsxindex 2b0fe1df..4331d5c5 100644--- a/hooks/use-mobile.tsx+++ b/hooks/use-mobile.tsx@@ -1,4 +1,4 @@-import * as React from "react"+import * as React from 'react'const MOBILE_BREAKPOINT = 768@@ -10,9 +10,9 @@ export function useIsMobile() {const onChange = () => {setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)}- mql.addEventListener("change", onChange)+ mql.addEventListener('change', onChange)setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)- return () => mql.removeEventListener("change", onChange)+ return () => mql.removeEventListener('change', onChange)}, [])return !!isMobilediff --git a/lib/actions/chat.ts b/lib/actions/chat.tsindex d07b7247..d7055e2d 100644--- a/lib/actions/chat.ts+++ b/lib/actions/chat.ts@@ -1,10 +1,11 @@'use server'-import { getRedisClient, RedisWrapper } from '@/lib/redis/config'-import { type Chat } from '@/lib/types'import { revalidatePath } from 'next/cache'import { redirect } from 'next/navigation'+import { getRedisClient, RedisWrapper } from '@/lib/redis/config'+import { type Chat } from '@/lib/types'+async function getRedis(): Promise<RedisWrapper> {return await getRedisClient()}diff --git a/lib/agents/generate-related-questions.ts b/lib/agents/generate-related-questions.tsindex 907e3244..bfc95b41 100644--- a/lib/agents/generate-related-questions.ts+++ b/lib/agents/generate-related-questions.ts@@ -1,5 +1,7 @@-import { relatedSchema } from '@/lib/schema/related'import { CoreMessage, generateObject } from 'ai'++import { relatedSchema } from '@/lib/schema/related'+import {getModel,getToolCallModel,diff --git a/lib/agents/manual-researcher.ts b/lib/agents/manual-researcher.tsindex ce7a5613..7e460c4c 100644--- a/lib/agents/manual-researcher.ts+++ b/lib/agents/manual-researcher.ts@@ -1,4 +1,5 @@import { CoreMessage, smoothStream, streamText } from 'ai'+import { getModel } from '../utils/registry'const BASE_SYSTEM_PROMPT = `diff --git a/lib/agents/researcher.ts b/lib/agents/researcher.tsindex a2806d51..69d81e50 100644--- a/lib/agents/researcher.ts+++ b/lib/agents/researcher.ts@@ -1,4 +1,5 @@import { CoreMessage, smoothStream, streamText } from 'ai'+import { createQuestionTool } from '../tools/question'import { retrieveTool } from '../tools/retrieve'import { createSearchTool } from '../tools/search'diff --git a/lib/config/models.ts b/lib/config/models.tsindex fd15db08..e5fdd4a4 100644--- a/lib/config/models.ts+++ b/lib/config/models.ts@@ -1,5 +1,6 @@import { Model } from '@/lib/types/models'import { getBaseUrl } from '@/lib/utils/url'+import defaultModels from './default-models.json'export function validateModel(model: any): model is Model {@@ -75,4 +76,3 @@ export async function getModels(): Promise<Model[]> {console.warn('All attempts to load models failed, returning empty array')return []}-diff --git a/lib/streaming/create-manual-tool-stream.ts b/lib/streaming/create-manual-tool-stream.tsindex 6a59be08..829d8ddf 100644--- a/lib/streaming/create-manual-tool-stream.ts+++ b/lib/streaming/create-manual-tool-stream.ts@@ -5,9 +5,11 @@ import {JSONValue,streamText} from 'ai'+import { manualResearcher } from '../agents/manual-researcher'import { ExtendedCoreMessage } from '../types'import { getMaxAllowedTokens, truncateMessages } from '../utils/context-window'+import { handleStreamFinish } from './handle-stream-finish'import { executeToolCall } from './tool-execution'import { BaseStreamConfig } from './types'diff --git a/lib/streaming/create-tool-calling-stream.ts b/lib/streaming/create-tool-calling-stream.tsindex 712835f0..0c3cdd42 100644--- a/lib/streaming/create-tool-calling-stream.ts+++ b/lib/streaming/create-tool-calling-stream.ts@@ -1,4 +1,3 @@-import { researcher } from '@/lib/agents/researcher'import {convertToCoreMessages,CoreMessage,@@ -6,8 +5,12 @@ import {DataStreamWriter,streamText} from 'ai'++import { researcher } from '@/lib/agents/researcher'+import { getMaxAllowedTokens, truncateMessages } from '../utils/context-window'import { isReasoningModel } from '../utils/registry'+import { handleStreamFinish } from './handle-stream-finish'import { BaseStreamConfig } from './types'diff --git a/lib/streaming/handle-stream-finish.ts b/lib/streaming/handle-stream-finish.tsindex 52e145e5..af822265 100644--- a/lib/streaming/handle-stream-finish.ts+++ b/lib/streaming/handle-stream-finish.ts@@ -1,8 +1,9 @@+import { CoreMessage, DataStreamWriter, JSONValue, Message } from 'ai'+import { getChat, saveChat } from '@/lib/actions/chat'import { generateRelatedQuestions } from '@/lib/agents/generate-related-questions'import { ExtendedCoreMessage } from '@/lib/types'import { convertToExtendedCoreMessages } from '@/lib/utils'-import { CoreMessage, DataStreamWriter, JSONValue, Message } from 'ai'interface HandleStreamFinishParams {responseMessages: CoreMessage[]diff --git a/lib/streaming/tool-execution.ts b/lib/streaming/tool-execution.tsindex eeb1a1b4..df694065 100644--- a/lib/streaming/tool-execution.ts+++ b/lib/streaming/tool-execution.ts@@ -6,10 +6,12 @@ import {JSONValue} from 'ai'import { z } from 'zod'+import { searchSchema } from '../schema/search'import { search } from '../tools/search'import { ExtendedCoreMessage } from '../types'import { getModel } from '../utils/registry'+import { parseToolCallXml } from './parse-tool-call'interface ToolExecutionResult {diff --git a/lib/streaming/types.ts b/lib/streaming/types.tsindex 4501235d..b796315b 100644--- a/lib/streaming/types.ts+++ b/lib/streaming/types.ts@@ -1,4 +1,5 @@import { Message } from 'ai'+import { Model } from '../types/models'export interface BaseStreamConfig {diff --git a/lib/supabase/middleware.ts b/lib/supabase/middleware.tsindex b4ee9c54..cb3a30b7 100644--- a/lib/supabase/middleware.ts+++ b/lib/supabase/middleware.ts@@ -1,5 +1,6 @@+import { type NextRequest, NextResponse } from 'next/server'+import { createServerClient } from '@supabase/ssr'-import { NextResponse, type NextRequest } from 'next/server'export async function updateSession(request: NextRequest) {let supabaseResponse = NextResponse.next({diff --git a/lib/supabase/server.ts b/lib/supabase/server.tsindex 40633b0c..71948b9b 100644--- a/lib/supabase/server.ts+++ b/lib/supabase/server.ts@@ -1,6 +1,7 @@-import { createServerClient } from '@supabase/ssr'import { cookies } from 'next/headers'+import { createServerClient } from '@supabase/ssr'+export async function createClient() {const cookieStore = await cookies()@@ -22,8 +23,8 @@ export async function createClient() {// This can be ignored if you have middleware refreshing// user sessions.}- },- },+ }+ }})}diff --git a/lib/tools/question.ts b/lib/tools/question.tsindex 669b86ba..1a6972a3 100644--- a/lib/tools/question.ts+++ b/lib/tools/question.ts@@ -1,6 +1,7 @@-import { getQuestionSchemaForModel } from '@/lib/schema/question'import { tool } from 'ai'+import { getQuestionSchemaForModel } from '@/lib/schema/question'+/*** Creates a question tool with the appropriate schema for the specified model.*/diff --git a/lib/tools/retrieve.ts b/lib/tools/retrieve.tsindex 1d1a9e9d..af1ca62f 100644--- a/lib/tools/retrieve.ts+++ b/lib/tools/retrieve.ts@@ -1,4 +1,5 @@import { tool } from 'ai'+import { retrieveSchema } from '@/lib/schema/retrieve'import { SearchResults as SearchResultsType } from '@/lib/types'diff --git a/lib/tools/search.ts b/lib/tools/search.tsindex a5e35082..6869fc05 100644--- a/lib/tools/search.ts+++ b/lib/tools/search.ts@@ -1,8 +1,14 @@+import { tool } from 'ai'+import { getSearchSchemaForModel } from '@/lib/schema/search'import { SearchResults } from '@/lib/types'import { getBaseUrlString } from '@/lib/utils/url'-import { tool } from 'ai'-import { DEFAULT_PROVIDER, SearchProviderType, createSearchProvider } from './search/providers'++import {+ createSearchProvider,+ DEFAULT_PROVIDER,+ SearchProviderType+} from './search/providers'/*** Creates a search tool with the appropriate schema for the given model.@@ -49,7 +55,7 @@ export function createSearchTool(fullModel: string) {) {// Get the base URL using the centralized utility functionconst baseUrl = await getBaseUrlString()-+const response = await fetch(`${baseUrl}/api/advanced-search`, {method: 'POST',headers: { 'Content-Type': 'application/json' },diff --git a/lib/tools/search/providers/base.ts b/lib/tools/search/providers/base.tsindex e94c7403..c709e7d1 100644--- a/lib/tools/search/providers/base.ts+++ b/lib/tools/search/providers/base.ts@@ -19,15 +19,25 @@ export abstract class BaseSearchProvider implements SearchProvider {excludeDomains: string[]): Promise<SearchResults>- protected validateApiKey(key: string | undefined, providerName: string): void {+ protected validateApiKey(+ key: string | undefined,+ providerName: string+ ): void {if (!key) {- throw new Error(`${providerName}_API_KEY is not set in the environment variables`)+ throw new Error(+ `${providerName}_API_KEY is not set in the environment variables`+ )}}- protected validateApiUrl(url: string | undefined, providerName: string): void {+ protected validateApiUrl(+ url: string | undefined,+ providerName: string+ ): void {if (!url) {- throw new Error(`${providerName}_API_URL is not set in the environment variables`)+ throw new Error(+ `${providerName}_API_URL is not set in the environment variables`+ )}}-}\ No newline at end of file+}diff --git a/lib/tools/search/providers/exa.ts b/lib/tools/search/providers/exa.tsindex d0303bdf..be8239d6 100644--- a/lib/tools/search/providers/exa.ts+++ b/lib/tools/search/providers/exa.ts@@ -1,5 +1,7 @@-import { SearchResults } from '@/lib/types'import Exa from 'exa-js'++import { SearchResults } from '@/lib/types'+import { BaseSearchProvider } from './base'export class ExaSearchProvider extends BaseSearchProvider {@@ -32,4 +34,4 @@ export class ExaSearchProvider extends BaseSearchProvider {number_of_results: exaResults.results.length}}-}\ No newline at end of file+}diff --git a/lib/tools/search/providers/index.ts b/lib/tools/search/providers/index.tsindex c9101fe6..ebaba485 100644--- a/lib/tools/search/providers/index.ts+++ b/lib/tools/search/providers/index.ts@@ -6,9 +6,12 @@ import { TavilySearchProvider } from './tavily'export type SearchProviderType = 'tavily' | 'exa' | 'searxng'export const DEFAULT_PROVIDER: SearchProviderType = 'tavily'-export function createSearchProvider(type?: SearchProviderType): SearchProvider {- const providerType = type || (process.env.SEARCH_API as SearchProviderType) || DEFAULT_PROVIDER-+export function createSearchProvider(+ type?: SearchProviderType+): SearchProvider {+ const providerType =+ type || (process.env.SEARCH_API as SearchProviderType) || DEFAULT_PROVIDER+switch (providerType) {case 'tavily':return new TavilySearchProvider()@@ -26,4 +29,3 @@ export type { ExaSearchProvider } from './exa'export { SearXNGSearchProvider } from './searxng'export { TavilySearchProvider } from './tavily'export type { SearchProvider }-diff --git a/lib/tools/search/providers/searxng.ts b/lib/tools/search/providers/searxng.tsindex 68530d19..4dacd79e 100644--- a/lib/tools/search/providers/searxng.ts+++ b/lib/tools/search/providers/searxng.ts@@ -1,4 +1,10 @@-import { SearchResultItem, SearchResults, SearXNGResponse, SearXNGResult } from '@/lib/types'+import {+ SearchResultItem,+ SearchResults,+ SearXNGResponse,+ SearXNGResult+} from '@/lib/types'+import { BaseSearchProvider } from './base'export class SearXNGSearchProvider extends BaseSearchProvider {@@ -84,4 +90,4 @@ export class SearXNGSearchProvider extends BaseSearchProvider {throw error}}-}\ No newline at end of file+}diff --git a/lib/tools/search/providers/tavily.ts b/lib/tools/search/providers/tavily.tsindex 3344cdc4..65b30975 100644--- a/lib/tools/search/providers/tavily.ts+++ b/lib/tools/search/providers/tavily.ts@@ -1,5 +1,6 @@import { SearchResultImage, SearchResults } from '@/lib/types'import { sanitizeUrl } from '@/lib/utils'+import { BaseSearchProvider } from './base'export class TavilySearchProvider extends BaseSearchProvider {@@ -45,10 +46,12 @@ export class TavilySearchProvider extends BaseSearchProvider {const data = await response.json()const processedImages = includeImageDescriptions? data.images- .map(({ url, description }: { url: string; description: string }) => ({- url: sanitizeUrl(url),- description- }))+ .map(+ ({ url, description }: { url: string; description: string }) => ({+ url: sanitizeUrl(url),+ description+ })+ ).filter((image: SearchResultImage@@ -64,4 +67,4 @@ export class TavilySearchProvider extends BaseSearchProvider {images: processedImages}}-}\ No newline at end of file+}diff --git a/lib/tools/video-search.ts b/lib/tools/video-search.tsindex 89834eaf..ebe3255e 100644--- a/lib/tools/video-search.ts+++ b/lib/tools/video-search.ts@@ -1,6 +1,7 @@-import { getSearchSchemaForModel } from '@/lib/schema/search'import { tool } from 'ai'+import { getSearchSchemaForModel } from '@/lib/schema/search'+/*** Creates a video search tool with the appropriate schema for the model.*/diff --git a/lib/utils/context-window.ts b/lib/utils/context-window.tsindex 94dfda82..d92ee4c1 100644--- a/lib/utils/context-window.ts+++ b/lib/utils/context-window.ts@@ -1,4 +1,5 @@import { CoreMessage } from 'ai'+import { Model } from '../types/models'const DEFAULT_CONTEXT_WINDOW = 128_000diff --git a/lib/utils/index.ts b/lib/utils/index.tsindex 7ea663c9..be86c64b 100644--- a/lib/utils/index.ts+++ b/lib/utils/index.ts@@ -1,4 +1,3 @@-import { type Model } from '@/lib/types/models'import {convertToCoreMessages,CoreMessage,@@ -10,6 +9,9 @@ import {} from 'ai'import { type ClassValue, clsx } from 'clsx'import { twMerge } from 'tailwind-merge'++import { type Model } from '@/lib/types/models'+import { ExtendedCoreMessage } from '../types'export function cn(...inputs: ClassValue[]) {return twMerge(clsx(inputs))diff --git a/lib/utils/url.ts b/lib/utils/url.tsindex f0760c3f..f1bb111a 100644--- a/lib/utils/url.ts+++ b/lib/utils/url.ts@@ -39,7 +39,7 @@ export async function getBaseUrlFromHeaders(): Promise<URL> {export async function getBaseUrl(): Promise<URL> {// Check for environment variables firstconst baseUrlEnv = process.env.NEXT_PUBLIC_BASE_URL || process.env.BASE_URL-+if (baseUrlEnv) {try {const baseUrlObj = new URL(baseUrlEnv)@@ -52,7 +52,7 @@ export async function getBaseUrl(): Promise<URL> {// Fall back to headers if the environment variable is invalid}}-+// If no valid environment variable is available, use headersreturn await getBaseUrlFromHeaders()}@@ -65,4 +65,4 @@ export async function getBaseUrl(): Promise<URL> {export async function getBaseUrlString(): Promise<string> {const baseUrlObj = await getBaseUrl()return baseUrlObj.toString()-}\ No newline at end of file+}diff --git a/package.json b/package.jsonindex 1f7c4c7d..877455c1 100644--- a/package.json+++ b/package.json@@ -83,6 +83,7 @@"@types/react-syntax-highlighter": "^15.5.13","eslint": "^8","eslint-config-next": "^14.2.25",+ "eslint-plugin-simple-import-sort": "^12.1.1","postcss": "^8","prettier": "^3.6.2","tailwindcss": "^3.4.1",diff --git a/postcss.config.mjs b/postcss.config.mjsindex 1a69fd2a..b1d7bf47 100644--- a/postcss.config.mjs+++ b/postcss.config.mjs@@ -1,8 +1,8 @@/** @type {import('postcss-load-config').Config} */const config = {plugins: {- tailwindcss: {},- },-};+ tailwindcss: {}+ }+}-export default config;+export default configdiff --git a/prettier.config.js b/prettier.config.jsindex 9b7f5b7e..e4684e14 100644--- a/prettier.config.js+++ b/prettier.config.js@@ -6,29 +6,5 @@ module.exports = {singleQuote: true,arrowParens: 'avoid',tabWidth: 2,- trailingComma: 'none',- importOrder: [- '^(react/(.*)$)|^(react$)',- '^(next/(.*)$)|^(next$)',- '<THIRD_PARTY_MODULES>',- '',- '^types$',- '^@/types/(.*)$',- '^@/config/(.*)$',- '^@/lib/(.*)$',- '^@/hooks/(.*)$',- '^@/components/ui/(.*)$',- '^@/components/(.*)$',- '^@/registry/(.*)$',- '^@/styles/(.*)$',- '^@/app/(.*)$',- '',- '^[./]',- ],- importOrderSeparation: false,- importOrderSortSpecifiers: true,- importOrderBuiltinModulesToTop: true,- importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],- importOrderMergeDuplicateImports: true,- importOrderCombineTypeAndValueImports: true,-};+ trailingComma: 'none'+}diff --git a/searxng-settings.yml b/searxng-settings.ymlindex 685db6f3..d655ff82 100755--- a/searxng-settings.yml+++ b/searxng-settings.yml@@ -32,4 +32,4 @@ server:search:formats:- - json\ No newline at end of file+ - jsondiff --git a/tailwind.config.ts b/tailwind.config.tsindex 3d330ebb..e78e7f6d 100644--- a/tailwind.config.ts+++ b/tailwind.config.ts@@ -11,149 +11,146 @@ const config = {],prefix: '',theme: {- container: {- center: true,- padding: '2rem',- screens: {- '2xl': '1400px'- }- },- extend: {- colors: {- border: 'hsl(var(--border))',- input: 'hsl(var(--input))',- ring: 'hsl(var(--ring))',- background: 'hsl(var(--background))',- foreground: 'hsl(var(--foreground))',- primary: {- DEFAULT: 'hsl(var(--primary))',- foreground: 'hsl(var(--primary-foreground))'- },- secondary: {- DEFAULT: 'hsl(var(--secondary))',- foreground: 'hsl(var(--secondary-foreground))'- },- destructive: {- DEFAULT: 'hsl(var(--destructive))',- foreground: 'hsl(var(--destructive-foreground))'- },- muted: {- DEFAULT: 'hsl(var(--muted))',- foreground: 'hsl(var(--muted-foreground))'- },- accent: {- DEFAULT: 'hsl(var(--accent))',- foreground: 'hsl(var(--accent-foreground))',- blue: {- DEFAULT: 'hsl(var(--accent-blue))',- foreground: 'hsl(var(--accent-blue-foreground))',- border: 'hsl(var(--accent-blue-border))'- }- },- popover: {- DEFAULT: 'hsl(var(--popover))',- foreground: 'hsl(var(--popover-foreground))'- },- card: {- DEFAULT: 'hsl(var(--card))',- foreground: 'hsl(var(--card-foreground))'- },- chart: {- '1': 'hsl(var(--chart-1))',- '2': 'hsl(var(--chart-2))',- '3': 'hsl(var(--chart-3))',- '4': 'hsl(var(--chart-4))',- '5': 'hsl(var(--chart-5))'- },- sidebar: {- DEFAULT: 'hsl(var(--sidebar-background))',- foreground: 'hsl(var(--sidebar-foreground))',- primary: 'hsl(var(--sidebar-primary))',- 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',- accent: 'hsl(var(--sidebar-accent))',- 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',- border: 'hsl(var(--sidebar-border))',- ring: 'hsl(var(--sidebar-ring))'- }- },- borderRadius: {- lg: 'var(--radius)',- md: 'calc(var(--radius) - 2px)',- sm: 'calc(var(--radius) - 4px)'- },- keyframes: {- 'accordion-down': {- from: {- height: '0'- },- to: {- height: 'var(--radix-accordion-content-height)'- }- },- 'accordion-up': {- from: {- height: 'var(--radix-accordion-content-height)'- },- to: {- height: '0'- }- },- 'collapse-down': {- from: {- height: '0',- opacity: '0'- },- to: {- height: 'var(--radix-collapsible-content-height)',- opacity: '1'- }- },- 'collapse-up': {- from: {- height: 'var(--radix-collapsible-content-height)',- opacity: '1'- },- to: {- height: '0',- opacity: '0'- }- },- 'slide-in-right': {- from: {- transform: 'translateX(100%)',- opacity: '0'- },- to: {- transform: 'translateX(0)',- opacity: '1'- }- },- 'slide-out-right': {- from: {- transform: 'translateX(0)',- opacity: '1'- },- to: {- transform: 'translateX(100%)',- opacity: '0'- }- }- },- animation: {- 'accordion-down': 'accordion-down 0.2s ease-out',- 'accordion-up': 'accordion-up 0.2s ease-out',- 'collapse-down': 'collapse-down 0.1s ease-in-out',- 'collapse-up': 'collapse-up 0.1s ease-in-out',- 'slide-in-right': 'slide-in-right 0.2s ease-out',- 'slide-out-right': 'slide-out-right 0.2s ease-out'- },- fontFamily: {- sans: [- 'var(--font-sans)',- ...fontFamily.sans- ]- }- }+ container: {+ center: true,+ padding: '2rem',+ screens: {+ '2xl': '1400px'+ }+ },+ extend: {+ colors: {+ border: 'hsl(var(--border))',+ input: 'hsl(var(--input))',+ ring: 'hsl(var(--ring))',+ background: 'hsl(var(--background))',+ foreground: 'hsl(var(--foreground))',+ primary: {+ DEFAULT: 'hsl(var(--primary))',+ foreground: 'hsl(var(--primary-foreground))'+ },+ secondary: {+ DEFAULT: 'hsl(var(--secondary))',+ foreground: 'hsl(var(--secondary-foreground))'+ },+ destructive: {+ DEFAULT: 'hsl(var(--destructive))',+ foreground: 'hsl(var(--destructive-foreground))'+ },+ muted: {+ DEFAULT: 'hsl(var(--muted))',+ foreground: 'hsl(var(--muted-foreground))'+ },+ accent: {+ DEFAULT: 'hsl(var(--accent))',+ foreground: 'hsl(var(--accent-foreground))',+ blue: {+ DEFAULT: 'hsl(var(--accent-blue))',+ foreground: 'hsl(var(--accent-blue-foreground))',+ border: 'hsl(var(--accent-blue-border))'+ }+ },+ popover: {+ DEFAULT: 'hsl(var(--popover))',+ foreground: 'hsl(var(--popover-foreground))'+ },+ card: {+ DEFAULT: 'hsl(var(--card))',+ foreground: 'hsl(var(--card-foreground))'+ },+ chart: {+ '1': 'hsl(var(--chart-1))',+ '2': 'hsl(var(--chart-2))',+ '3': 'hsl(var(--chart-3))',+ '4': 'hsl(var(--chart-4))',+ '5': 'hsl(var(--chart-5))'+ },+ sidebar: {+ DEFAULT: 'hsl(var(--sidebar-background))',+ foreground: 'hsl(var(--sidebar-foreground))',+ primary: 'hsl(var(--sidebar-primary))',+ 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',+ accent: 'hsl(var(--sidebar-accent))',+ 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',+ border: 'hsl(var(--sidebar-border))',+ ring: 'hsl(var(--sidebar-ring))'+ }+ },+ borderRadius: {+ lg: 'var(--radius)',+ md: 'calc(var(--radius) - 2px)',+ sm: 'calc(var(--radius) - 4px)'+ },+ keyframes: {+ 'accordion-down': {+ from: {+ height: '0'+ },+ to: {+ height: 'var(--radix-accordion-content-height)'+ }+ },+ 'accordion-up': {+ from: {+ height: 'var(--radix-accordion-content-height)'+ },+ to: {+ height: '0'+ }+ },+ 'collapse-down': {+ from: {+ height: '0',+ opacity: '0'+ },+ to: {+ height: 'var(--radix-collapsible-content-height)',+ opacity: '1'+ }+ },+ 'collapse-up': {+ from: {+ height: 'var(--radix-collapsible-content-height)',+ opacity: '1'+ },+ to: {+ height: '0',+ opacity: '0'+ }+ },+ 'slide-in-right': {+ from: {+ transform: 'translateX(100%)',+ opacity: '0'+ },+ to: {+ transform: 'translateX(0)',+ opacity: '1'+ }+ },+ 'slide-out-right': {+ from: {+ transform: 'translateX(0)',+ opacity: '1'+ },+ to: {+ transform: 'translateX(100%)',+ opacity: '0'+ }+ }+ },+ animation: {+ 'accordion-down': 'accordion-down 0.2s ease-out',+ 'accordion-up': 'accordion-up 0.2s ease-out',+ 'collapse-down': 'collapse-down 0.1s ease-in-out',+ 'collapse-up': 'collapse-up 0.1s ease-in-out',+ 'slide-in-right': 'slide-in-right 0.2s ease-out',+ 'slide-out-right': 'slide-out-right 0.2s ease-out'+ },+ fontFamily: {+ sans: ['var(--font-sans)', ...fontFamily.sans]+ }+ }},plugins: [require('tailwindcss-animate'), require('@tailwindcss/typography')]} satisfies Configdiff --git a/tsconfig.json b/tsconfig.jsonindex d81d4ee1..64c21044 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -1,10 +1,6 @@{"compilerOptions": {- "lib": [- "dom",- "dom.iterable",- "esnext"- ],+ "lib": ["dom", "dom.iterable", "esnext"],"allowJs": true,"skipLibCheck": true,"strict": true,@@ -22,19 +18,10 @@}],"paths": {- "@/*": [- "./*"- ]+ "@/*": ["./*"]},"target": "ES2017"},- "include": [- "next-env.d.ts",- "**/*.ts",- "**/*.tsx",- ".next/types/**/*.ts"- ],- "exclude": [- "node_modules"- ]+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],+ "exclude": ["node_modules"]}