Open History to see the last commit
1import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "./ui/empty";
2import { SidebarInset, SidebarTrigger } from "./ui/sidebar";
3import { isElectron } from "../env";
4import { cn } from "~/lib/utils";
5
6export function NoActiveThreadState() {
7 return (
8 <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
9 <div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background">
10 <header
11 className={cn(
12 "border-b border-border px-3 sm:px-5",
13 isElectron ? "drag-region flex h-[52px] items-center" : "py-2 sm:py-3",
14 )}
15 >
16 {isElectron ? (
17 <span className="text-xs text-muted-foreground/50">No active thread</span>
18 ) : (
19 <div className="flex items-center gap-2">
20 <SidebarTrigger className="size-7 shrink-0 md:hidden" />
21 <span className="text-sm font-medium text-foreground md:text-muted-foreground/60">
22 No active thread
23 </span>
24 </div>
25 )}
26 </header>
27
28 <Empty className="flex-1">
29 <div className="w-full max-w-lg rounded-3xl border border-border/55 bg-card/20 px-8 py-12 shadow-sm/5">
30 <EmptyHeader className="max-w-none">
31 <EmptyTitle className="text-foreground text-xl">Pick a thread to continue</EmptyTitle>
32 <EmptyDescription className="mt-2 text-sm text-muted-foreground/78">
33 Select an existing thread or create a new one to get started.
34 </EmptyDescription>
35 </EmptyHeader>
36 </div>
37 </Empty>
38 </div>
39 </SidebarInset>
40 );
41}