"use client"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { CheckCircle, XCircle, Loader2, GitBranch, GitPullRequest, Bug, FilePlus2, Archive, } from "lucide-react"; import { useRouter } from "next/navigation"; import { ThreadDisplayInfo } from "./types"; import { TerminalInput } from "./terminal-input"; import { useFileUpload } from "@/hooks/useFileUpload"; import { cn } from "@/lib/utils"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../ui/tooltip"; import { Label } from "../ui/label"; import { ContentBlocksPreview } from "../thread/ContentBlocksPreview"; import { TooltipIconButton } from "../ui/tooltip-icon-button"; import { ThemeToggle } from "../theme-toggle"; import { ThreadCard, ThreadCardLoading } from "./thread-card"; interface DefaultViewProps { threads: ThreadDisplayInfo[]; threadsLoading: boolean; } export function DefaultView({ threads, threadsLoading }: DefaultViewProps) { const router = useRouter(); const apiUrl: string | undefined = process.env.NEXT_PUBLIC_API_URL ?? ""; const assistantId: string | undefined = process.env.NEXT_PUBLIC_MANAGER_ASSISTANT_ID ?? ""; const { contentBlocks, setContentBlocks, handleFileUpload, dropRef, removeBlock, dragOver, handlePaste, } = useFileUpload(); if (!apiUrl || !assistantId) { return