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