"use client"; import * as React from "react"; import Link from "next/link"; import { KeyRound, Code2, PenLine, Search, FileUp, Columns3, EyeOff } from "lucide-react"; import type { PolyModel } from "@/lib/client/types"; import { useApp } from "@/components/app/store"; import { LogoMark } from "@/components/brand/logo"; import { Button } from "@/components/ui/button"; import { CapabilityBadges } from "./model-badges"; import { Onboarding } from "@/components/app/onboarding"; import { cn } from "@/lib/utils"; interface QuickAction { key: string; icon: React.ReactNode; title: string; hint: string; /** Text inserted into the composer (Write / Code / Research). */ text?: string; } const QUICK: QuickAction[] = [ { key: "write", icon: , title: "Write", hint: "Emails, posts, docs", text: "Help me write a concise, friendly " }, { key: "code", icon: , title: "Code", hint: "Review, debug, generate", text: "Review the following code for bugs, edge cases and readability, and suggest concrete fixes.\n\n```\n\n```" }, { key: "research", icon: , title: "Research", hint: "Sources, comparisons", text: "Research the current state of " }, { key: "file", icon: , title: "Analyze a file", hint: "PDF, CSV, image, code" }, { key: "compare", icon: , title: "Compare models", hint: "Same prompt, 2โ€“4 models" }, ]; export function ChatEmptyState({ model, onPick, onAnalyzeFile, onCompare, temporary, projectName }: { model?: PolyModel; onPick: (text: string) => void; onAnalyzeFile?: () => void; onCompare?: () => void; temporary?: boolean; projectName?: string | null }) { const { connectedProviders, loadingModels, user, connections } = useApp(); const noProviders = !loadingModels && connectedProviders.size === 0; return (
{!user.onboardingCompletedAt && connections.length === 0 ? : null}

What do you want to work on?

{temporary ? ( Temporary chat โ€” not stored in history. ) : projectName ? ( <> In project {projectName} {model ? ( <> {" "} ยท {model.displayName} ) : null} ) : model ? ( <> Chatting with {model.displayName}. Switch anytime with โŒ˜/. ) : ( "One interface. Every model. Bring your own keys." )}

{model ? : null} {noProviders ? (

Connect your first provider

Add a key from OpenAI, Anthropic, Gemini, xAI, Mistral, DeepSeek, Kimi, OpenRouter or Cerebras. Keys are encrypted at rest and only decrypted server-side right before a request.

) : (
{QUICK.map((q) => { const onClick = q.key === "file" ? onAnalyzeFile : q.key === "compare" ? onCompare : () => onPick(q.text ?? ""); return ( ); })}
)}
); }