'use client'; import { Settings as SettingsIcon, ArrowLeft, Loader2 } from 'lucide-react'; import { useEffect, useState } from 'react'; import { cn } from '@/lib/utils'; import { Switch } from '@headlessui/react'; import ThemeSwitcher from '@/components/theme/Switcher'; import { ImagesIcon, VideoIcon } from 'lucide-react'; import Link from 'next/link'; interface SettingsType { chatModelProviders: { [key: string]: [Record]; }; embeddingModelProviders: { [key: string]: [Record]; }; openaiApiKey: string; groqApiKey: string; anthropicApiKey: string; geminiApiKey: string; ollamaApiUrl: string; deepseekApiKey: string; customOpenaiApiKey: string; customOpenaiApiUrl: string; customOpenaiModelName: string; searchEngine: string; tavilyApiKey?: string; } interface InputProps extends React.InputHTMLAttributes { isSaving?: boolean; onSave?: (value: string) => void; } const Input = ({ className, isSaving, onSave, ...restProps }: InputProps) => { return (
onSave?.(e.target.value)} /> {isSaving && (
)}
); }; interface TextareaProps extends React.InputHTMLAttributes { isSaving?: boolean; onSave?: (value: string) => void; } const Textarea = ({ className, isSaving, onSave, ...restProps }: TextareaProps) => { return (