diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts
index 515d947..7fc3ec8 100644
--- a/app/api/chat/route.ts
+++ b/app/api/chat/route.ts
@@ -42,7 +42,7 @@ export const POST = auth(async function POST(req: Request) {
if (req.auth?.user?.email == null) {
return
}
- const title = json.messages[0].content.substring(0, 20)
+ const title = json.messages[0].content.substring(0, 100)
const userId = (req as any).auth?.user?.email
const id = json.id ?? nanoid()
const createdAt = Date.now()
diff --git a/components/sidebar.tsx b/components/sidebar.tsx
index 75554e4..a4cbbc5 100644
--- a/components/sidebar.tsx
+++ b/components/sidebar.tsx
@@ -29,10 +29,7 @@ export function Sidebar({ session, children }: SidebarProps) {
Toggle Sidebar
-
+
Chat History
diff --git a/components/ui/sheet.tsx b/components/ui/sheet.tsx
index d333799..97deab9 100644
--- a/components/ui/sheet.tsx
+++ b/components/ui/sheet.tsx
@@ -2,7 +2,6 @@
import * as React from 'react'
import * as SheetPrimitive from '@radix-ui/react-dialog'
-import { cva, type VariantProps } from 'class-variance-authority'
import { cn } from '@/lib/utils'
import { IconClose } from '@/components/ui/icons'
@@ -42,33 +41,17 @@ const SheetOverlay = React.forwardRef<
))
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
-const sheetVariants = cva(
- 'fixed z-50 h-full scale-100 gap-4 border bg-background p-6 opacity-100 shadow-lg',
- {
- variants: {
- position: {
- left: 'data-[state=closed]:animate-slide-to-left data-[state=open]:animate-slide-from-left',
- right: 'h-full animate-in slide-in-from-right duration-300'
- }
- },
- defaultVariants: {
- position: 'left'
- }
- }
-)
-
-export interface DialogContentProps
- extends React.ComponentPropsWithoutRef,
- VariantProps {}
-
const SheetContent = React.forwardRef<
React.ElementRef,
- DialogContentProps
->(({ position, className, children, ...props }, ref) => (
+ React.ComponentPropsWithoutRef
+>(({ className, children, ...props }, ref) => (
{children}